chore(260329-x2a): add Dockerfile and .dockerignore for containerized deployment

- Multi-stage build: node:22-alpine for build, separate stage for serve
- Runs vite preview on port 4173 with host 0.0.0.0
- config.json mountable at runtime via -v /path/to/config.json:/app/dist/config.json:ro
This commit is contained in:
2026-03-29 23:50:23 +02:00
parent 5f47feaf32
commit 3f5fc0f960
2 changed files with 34 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
node_modules
dist
.git
.planning
*.md
.biome
.claude
.agents
+26
View File
@@ -0,0 +1,26 @@
# Stage 1 — build
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2 — serve
FROM node:22-alpine AS serve
WORKDIR /app
COPY --from=build /app/package*.json ./
RUN npm ci
COPY --from=build /app/dist ./dist
COPY --from=build /app/vite.config.ts ./vite.config.ts
EXPOSE 4173
# Mount config: docker run -v /path/to/config.json:/app/dist/config.json:ro -p 4173:4173 zauberwald
CMD ["npm", "run", "preview"]