Merge pull request 'Upload files to "/"' (#3) from p3 into master
Reviewed-on: http://10.2.0.2:3000/jason/cpas/pulls/3
This commit was merged in pull request #3.
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -20,12 +20,10 @@ RUN cd client && npm run build
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Stage 2: Production image
|
||||
# Copies only what's needed to run — no dev tools, no node_modules for client.
|
||||
# Final image is lean (~180MB) and ready to run with zero host setup.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
FROM node:20-alpine AS production
|
||||
|
||||
# Chromium + deps for Phase 3 Puppeteer PDF generation
|
||||
# Chromium for Puppeteer PDF generation
|
||||
RUN apk add --no-cache \
|
||||
chromium \
|
||||
nss \
|
||||
@@ -42,16 +40,17 @@ ENV DB_PATH=/data/cpas.db
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy backend deps from builder
|
||||
# Copy backend node_modules and compiled frontend from builder
|
||||
COPY --from=builder /build/node_modules ./node_modules
|
||||
COPY --from=builder /build/client/dist ./client/dist
|
||||
|
||||
# Copy backend source
|
||||
# Copy all backend source files
|
||||
COPY server.js ./
|
||||
COPY db/ ./db/
|
||||
COPY package.json ./
|
||||
COPY db/ ./db/
|
||||
COPY pdf/ ./pdf/
|
||||
|
||||
# Ensure data directory exists (will be overridden by volume mount)
|
||||
# Ensure data directory exists
|
||||
RUN mkdir -p /data
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
Reference in New Issue
Block a user