chore: add node docker service for vite dev server and prod build

This commit is contained in:
thibaud-leclere
2026-03-28 13:14:09 +01:00
parent c3dab636b1
commit d175202163
6 changed files with 66 additions and 1 deletions

24
docker/node/Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM node:22-alpine AS base
WORKDIR /app
###
# Dev stage
###
FROM base AS dev
# Dependencies are mounted via volume, install at startup
CMD ["sh", "-c", "npm install && npx vite"]
###
# Build stage (used by app prod image)
###
FROM base AS build
COPY package.json package-lock.json* ./
RUN npm install
COPY assets/ ./assets/
COPY vite.config.js ./
RUN npm run build