From 881f6c87260129dcab8d2233dc68e2c2268f69a6 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 15 May 2024 16:52:59 -0400 Subject: [PATCH] fix version and redirect, speed build --- frontend/Dockerfile | 11 +++++++---- frontend/src/routes/+page.svelte | 12 +++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index b57c1be3..7426cd55 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -2,16 +2,19 @@ FROM node:21-bookworm-slim as build-stage WORKDIR /app -ARG PUBLIC_DOC_VERSION -ARG PUBLIC_DOC_BUILD_TIMESTAMP - +COPY package*.json . +RUN npm ci COPY . . -RUN npm install RUN npm run check RUN npm run build FROM nginx:1.25-bookworm as production +ARG PUBLIC_DOC_VERSION_ARG +ARG PUBLIC_DOC_BUILD_TIMESTAMP_ARG +ENV PUBLIC_DOC_VERSION=${PUBLIC_DOC_VERSION_ARG} +ENV PUBLIC_DOC_BUILD_TIMESTAMP=${PUBLIC_DOC_BUILD_TIMESTAMP_ARG} + RUN apt-get update && apt-get install nodejs npm -y RUN npm install pm2 -g diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index 2030e81b..303d879a 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -1,7 +1,9 @@ - +