From d5e2f374c07d976cd56ece3aef6819def2b00502 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 25 Mar 2021 10:20:32 +0100 Subject: docker: add dockerfile --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..827cde4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# build stage +FROM node:14-alpine as build-stage +WORKDIR /app +COPY package*.json ./ + +# environment variables +ARG VUE_APP_BACKEND_URL + +RUN npm install --production +COPY . . +RUN npm run build --production + +# production stage +FROM nginx:stable-alpine as production-stage +COPY ./nginx.conf /temp/prod.conf +RUN envsubst /app < /temp/prod.conf > /etc/nginx/conf.d/default.conf +COPY --from=build-stage /app/dist/ /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] -- cgit v1.2.3-18-g5258