feat: Update Dockerfile for Node 20 and add vite-env.d.ts for environment variables

This commit is contained in:
2026-03-09 22:03:55 +01:00
parent fe441c4bea
commit babef04f9a
2 changed files with 30 additions and 3 deletions
+6 -3
View File
@@ -1,9 +1,10 @@
FROM node:18-alpine AS build
FROM node:20-alpine AS build
WORKDIR /app
ENV NODE_ENV=production
# Install dependencies
# Install dependencies (include devDependencies for the build)
COPY package*.json ./
# Ensure devDependencies are installed during the build
ENV NODE_ENV=development
RUN npm ci --silent
# Copy source and build
@@ -11,6 +12,8 @@ COPY . .
RUN npm run build
FROM nginx:stable-alpine AS production
WORKDIR /usr/share/nginx/html
# Copy built files from the build stage
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80 443