-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (27 loc) · 784 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (27 loc) · 784 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
FROM node:20-slim AS frontend-builder
WORKDIR /app
COPY frontend/package*.json ./frontend/
RUN cd frontend && npm ci
COPY frontend ./frontend
RUN cd frontend && npm run build
FROM node:20-slim
ARG BUILD
ENV BUILD=${BUILD}
ENV NODE_ENV=production
EXPOSE 3939
WORKDIR /app
COPY app.js ./
COPY version.json ./
COPY package*.json ./
COPY --from=frontend-builder /app/frontend/production ./frontend/production
RUN npm ci --production --no-audit --no-fund
COPY backend ./backend
COPY bin ./bin
COPY webhook ./webhook
HEALTHCHECK \
--interval=30s \
--timeout=5s \
--start-period=10s \
--retries=3 \
CMD node -e "require('http').get('http://localhost:3939', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"
ENTRYPOINT ["npm", "start"]