-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 808 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (19 loc) · 808 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
# Pinned to a specific minor for reproducible builds; bump deliberately.
FROM node:24-alpine
ENV NODE_ENV=production
# 0.0.0.0 here is scoped to the container's network namespace; actual exposure
# is controlled by how the port is published (-p 127.0.0.1:3000:3000 vs
# -p 3000:3000) or by the platform ingress (App Service / ACA). Only expose
# this container publicly behind an authenticated reverse proxy.
ENV HOST=0.0.0.0
ENV ALLOW_REMOTE_BIND=true
RUN mkdir -p /app && chown node:node /app
WORKDIR /app
COPY --chown=node:node package.json package-lock.json ./
RUN npm ci --omit=dev
COPY --chown=node:node . .
USER node
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD wget -qO- http://localhost:${PORT:-3000}/healthz || exit 1
CMD ["node", "server.js"]