-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 892 Bytes
/
Dockerfile
File metadata and controls
39 lines (28 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Build stage for React frontend
FROM node:20-alpine AS builder
WORKDIR /app/marketplace
# Install frontend dependencies
COPY apps/marketplace/package*.json ./
RUN npm install
# Copy frontend source and build
COPY apps/marketplace/ ./
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
# Copy server package and install
COPY package.json ./
RUN npm install --only=production --ignore-scripts
# Copy server code
COPY server ./server
COPY registry.json ./
# Copy app backends
COPY apps/hello-world/server ./apps/hello-world/server
COPY apps/mortgage-simulator/server ./apps/mortgage-simulator/server
COPY apps/shopping-list/server ./apps/shopping-list/server
COPY apps/task-manager/server ./apps/task-manager/server
# Copy built frontend from builder
COPY --from=builder /app/marketplace/dist ./apps/marketplace/dist
ENV PORT=8080
EXPOSE 8080
CMD ["npm", "start"]