Auto-commit 2026-04-29 16:31
This commit is contained in:
38
Dockerfile
Normal file
38
Dockerfile
Normal file
@@ -0,0 +1,38 @@
|
||||
# Build stage
|
||||
FROM node:18-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
COPY apps/ ./apps/
|
||||
COPY packages/ ./packages/
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
|
||||
# Build all packages
|
||||
RUN npm run build
|
||||
|
||||
# Production stage
|
||||
FROM node:18-alpine AS production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
COPY apps/ ./apps/
|
||||
COPY packages/ ./packages/
|
||||
|
||||
# Copy built artifacts from builder
|
||||
COPY --from=builder /app/apps/web/dist ./apps/web/dist
|
||||
COPY --from=builder /app/apps/api/dist ./apps/api/dist
|
||||
|
||||
# Install production dependencies only
|
||||
RUN npm ci --production
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
# Start the API server
|
||||
CMD ["node", "apps/api/dist/index.js"]
|
||||
Reference in New Issue
Block a user