This commit is contained in:
2026-03-27 23:33:31 -05:00
parent 9fa1df47ad
commit 6f7c038834
29 changed files with 2093 additions and 0 deletions

37
backend/Dockerfile Normal file
View File

@@ -0,0 +1,37 @@
# ── Build stage ──────────────────────────────────────────────────────────────
FROM node:20-slim AS builder
RUN apt-get update && apt-get install -y \
python3 make g++ \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package*.json tsconfig.json ./
RUN npm ci
COPY src ./src
RUN npm run build && npm prune --production
# ── Runtime stage ─────────────────────────────────────────────────────────────
FROM node:20-slim
# Install Chromium and runtime dependencies
RUN apt-get update && apt-get install -y \
chromium \
fonts-freefont-ttf \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
ENV NODE_ENV=production
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY package.json ./
EXPOSE 3001
CMD ["node", "dist/index.js"]