From a9e27f054f00f74a8f2aad6cfce7991a1f43b1a8 Mon Sep 17 00:00:00 2001 From: poiou123 Date: Sun, 10 Nov 2024 00:05:03 +0000 Subject: [PATCH] Created Dockerfile 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 --- Dockerfile | 14 ++++++++++++++ vite.config.js | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0aeecb0 --- /dev/null +++ b/Dockerfile @@ -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"] + diff --git a/vite.config.js b/vite.config.js index c1eb9eb..ad09e0e 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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({