elemes/flowchart/Dockerfile

24 lines
927 B
Docker
Raw Normal View History

2026-05-01 09:09:45 +07:00
## ── Builder ──────────────────────────────────────────────────────
FROM node:20-slim AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --no-audit --no-fund
2026-05-01 09:09:45 +07:00
COPY . .
RUN npm run build
## ── Runner ───────────────────────────────────────────────────────
FROM nginx:alpine
# Copy built static files to Nginx's default public directory
COPY --from=builder /app/dist/ /usr/share/nginx/html/
# Listen on 8081 (not 80) — all services share elemes-ts network
# namespace, where port 80 is taken by velxio. Tailscale serve strips
# the /flowchart/ mount point before proxying here.
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8081
2026-05-01 09:09:45 +07:00
CMD ["nginx", "-g", "daemon off;"]