- .gitea/workflows/test-build.yaml : construction des images et jobs de tests (back-end : ruff, migrations, pytest ; front : lint, types, tests, build) sur les pull requests - .gitea/workflows/build-and-release.yaml : publication des images sur Harbor à chaque tag - frontend/Dockerfile, nginx.conf, .dockerignore : image du front (nginx sans privilèges sur le port 8080, relais de /api, /admin et /static vers le back-end du pod) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
18 lines
377 B
Docker
18 lines
377 B
Docker
FROM node:24-alpine AS build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
RUN npm run build-only
|
|
|
|
# Sert le front et relaie /api, /admin et /static vers le back-end du même pod (port 8000).
|
|
FROM nginxinc/nginx-unprivileged:1.27-alpine
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 8080
|