Skip to content

Commit

Permalink
Created Dockerfile
Browse files Browse the repository at this point in the history
Added Dockerfile

Changes on vite.config.js in order to allow configuring port and host when pgtune listens when started

Those settings can be set as defualt or changed with env vars
  • Loading branch information
poiou123 committed Nov 10, 2024
1 parent dce7111 commit a9e27f0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM alpine:latest
RUN apk update
RUN apk upgrade
RUN apk add icu-data-full
RUN apk add nodejs npm yarn
WORKDIR /home
COPY . .
RUN yarn install

ENV VITE_HOST=0.0.0.0
ENV VITE_PORT=80
EXPOSE $VITE_PORT
ENTRYPOINT ["yarn", "dev"]

4 changes: 4 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export default defineConfig({
cssCodeSplit: false,
sourcemap: true
},
server: {
host: process.env.VITE_HOST || 'localhost',
port: process.env.VITE_PORT || 5173
},
plugins: [
vituum(),
liquid({
Expand Down

0 comments on commit a9e27f0

Please sign in to comment.