From c828925511cc3187a9063dbf4d835258b95164b9 Mon Sep 17 00:00:00 2001 From: ludelanier Date: Wed, 8 May 2024 02:55:27 +0200 Subject: [PATCH] deploy --- Dockerfile | 23 ++++++----------------- src/App.vue | 7 ++++++- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index c74d180..25c9459 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,9 @@ -# build stage -FROM node:lts-hydrogen AS build-stage +FROM node:lts-alpine as builder + WORKDIR /app -COPY package*.json ./ -# Omitting --ignore-script here, because they may be needed for dependencies to build well -# => a regular audit of our dependencies should be made, to notice and address any vulnerabilities -RUN npm install -# This copies all files from the current directory to the WORKDIR in the image -# It is only safe if the .dockerignore file is properly configured to avoid copying -# sensitive or useless files to the image -COPY . . +COPY . ./ +RUN npm install && npm run build -RUN npm run build +FROM nginx:alpine -# production stage -# FIXME? The nginx image runs with root as the default user. Make sure it is safe here -FROM nginx:stable-alpine AS production-stage -COPY nginx.conf /etc/nginx/conf.d/default.conf -COPY --from=build-stage /app/dist /usr/share/nginx/html -CMD ["nginx", "-g", "daemon off;"] +COPY --from=builder /app/dist /usr/share/nginx/html \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index f869eec..0af55b8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -205,7 +205,7 @@ onUnmounted(() => {
-
+
@@ -225,6 +225,11 @@ onUnmounted(() => {