forked from TheCryptoDonkey/DonkeyRide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (32 loc) · 921 Bytes
/
Copy pathDockerfile
File metadata and controls
43 lines (32 loc) · 921 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
40
41
42
43
# ==========================================
# Stage 1: build the React frontend
# ==========================================
FROM node:22-alpine AS web-build
WORKDIR /usr/src/web
COPY web/package*.json ./
RUN npm ci
COPY web/ ./
RUN npm run build
# ==========================================
# Stage 2: operator server
# ==========================================
FROM node:22-alpine
WORKDIR /usr/src/app
# Install production dependencies first (layer cache)
COPY package*.json ./
RUN npm ci --only=production
# App source
COPY server.js ./
COPY src/ ./src/
COPY payment-providers/ ./payment-providers/
COPY settlement/ ./settlement/
COPY middleware/ ./middleware/
COPY navigation/ ./navigation/
COPY public/ ./public/
# Built frontend from stage 1
COPY --from=web-build /usr/src/web/dist ./web/dist
# Expose API and WebSocket ports
EXPOSE 3000 3001
# Run as non-root user
USER node
CMD ["node", "server.js"]