-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 1.07 KB
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
# ── Build stage ───────────────────────────────────────────────────────────────
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY tsconfig.json ./
COPY src/ ./src/
RUN npm run build
# ── Runtime stage ─────────────────────────────────────────────────────────────
FROM node:22-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
# Port defaults — overridden by docker-compose environment section
ENV PORT=3456
ENV ACCOUNTS_PATH=/app/accounts.json
# Install only production deps
COPY package*.json ./
RUN npm ci --omit=dev && npm cache clean --force
COPY --from=builder /app/dist ./dist
EXPOSE 3456
# accounts.json is expected to be mounted at runtime via docker-compose volume
# The container will exit with a clear error if it's not present
ENTRYPOINT ["node", "dist/cli/index.js"]
CMD ["start"]