feat: dockerize client (nginx) and server (node) with docker-compose

This commit is contained in:
kevin.lhereec committed 2026-08-17 11:44:07 +02:00
1 parent 38814668e7
commit 8da1d1edc9
12 files changed
+143 -3

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
node_modules
*.log
.env
+20
View File
@@ -0,0 +1,20 @@
# ── Stage 1 : deps ───────────────────────────────────────────────────────────
FROM node:20-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci --omit=dev
# ── Stage 2 : runtime ─────────────────────────────────────────────────────────
FROM node:20-alpine
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NODE_ENV=production
ENV PORT=3000
EXPOSE 3000
CMD ["node", "src/index.js"]