chore: consolidate app compose dev and prod

This commit is contained in:
2026-05-27 22:55:00 +01:00
parent 77282893f3
commit e68eef8865
5 changed files with 14437 additions and 8 deletions
+7 -2
View File
@@ -1,12 +1,17 @@
FROM node:20 AS builder
WORKDIR /app
COPY package*.json ./
# TODO: Remove this or review embedded variables
COPY .env .env
# First generate package-lock.json if it doesn't exist, then do clean install
RUN if [ ! -f package-lock.json ]; then npm install --package-lock-only; fi && npm ci
COPY . .
# Vite bakes VITE_* values at build time, so compose must choose the env file
# during image build, not only at container runtime.
ARG ENV_FILE=.env
COPY ${ENV_FILE} .env
# Run build with production mode
RUN npm run build -- --mode production