Files
MSE-PI-E2EEDA-Plein-de-eeee…/ui/Dockerfile
khalil-bot a7eafa50f6 feat(ci): add Docker build, push and SSH deploy pipeline
- CI: lint, unit tests, production build on all branches
- Docker build & push on all branches (tag :latest on main, :branch-* on others)
- Deploy: SSH pull & restart on all branches (preprod validation)
- Trigger workflow on self-modification (.github/workflows/ui.yml)

Closes #38

Assisted-by: Claude:claude-sonnet-4-6
2026-05-18 12:11:04 +02:00

19 lines
803 B
Docker

# ── Stage 1 : build ──────────────────────────────────────────────────────────
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --prefer-offline
COPY . .
RUN npm run build -- --configuration production
# ── Stage 2 : serve ──────────────────────────────────────────────────────────
FROM nginx:1.27-alpine
COPY --from=builder /app/dist/dashboard/browser /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget -qO- http://localhost/ || exit 1