Files
Thieu Nguyen 1df0e518b6 fix(docker): update Makefile and compose for managed mode defaults (#86)
- Remove obsolete docker-compose.managed.yml reference from COMPOSE
- Add docker-compose.postgres.yml to default COMPOSE (required for managed mode)
- Add shared external network for cross-stack service discovery
- Add make targets: net, dev, migrate
- Fix UI healthcheck to use 127.0.0.1 instead of localhost

Co-authored-by: Viet Tran <viettranx@gmail.com>
2026-03-09 07:06:01 +07:00

31 lines
642 B
Docker

# syntax=docker/dockerfile:1
# ── Stage 1: Build ──
FROM node:22-alpine AS builder
RUN corepack enable && corepack prepare pnpm@10.28.2 --activate
WORKDIR /app
# Cache dependencies
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Copy source and build
COPY . .
RUN pnpm build
# ── Stage 2: Serve ──
FROM nginx:1.27-alpine
# Copy built assets
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD wget -qO- http://127.0.0.1:80/ || exit 1