Sprint 1 : scaffolding complet de Glibredecision
Plateforme de decisions collectives pour Duniter/G1. Backend FastAPI async + PostgreSQL (14 tables, 8 routers, 6 services, moteur de vote avec formule d'inertie WoT/Smith/TechComm). Frontend Nuxt 4 + Nuxt UI v3 + Pinia (9 pages, 5 stores). Infrastructure Docker + Woodpecker CI + Traefik. Documentation technique et utilisateur (15 fichiers). Seed : Licence G1, Engagement Forgeron v2.0.0, 4 protocoles de vote. 30 tests unitaires (formules, mode params, vote nuance) -- tous verts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
45
docker/frontend.Dockerfile
Normal file
45
docker/frontend.Dockerfile
Normal file
@@ -0,0 +1,45 @@
|
||||
# syntax = docker/dockerfile:1
|
||||
|
||||
ARG NODE_VERSION=20-slim
|
||||
|
||||
FROM node:${NODE_VERSION} AS base
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# ── Build ─────────────────────────────────────────────────────────────────────
|
||||
FROM base AS build
|
||||
|
||||
ENV NODE_ENV=development
|
||||
|
||||
COPY frontend/package.json frontend/package-lock.json* ./
|
||||
RUN npm ci
|
||||
|
||||
COPY frontend/ .
|
||||
RUN npm run build
|
||||
|
||||
# ── Production ────────────────────────────────────────────────────────────────
|
||||
FROM base AS production
|
||||
|
||||
ENV PORT=3000 \
|
||||
NODE_ENV=production
|
||||
|
||||
COPY --from=build /src/.output /src/.output
|
||||
|
||||
EXPOSE $PORT
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||
CMD curl -f http://localhost:${PORT}/ || exit 1
|
||||
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
|
||||
# ── Development ───────────────────────────────────────────────────────────────
|
||||
FROM base AS development
|
||||
|
||||
ENV NODE_ENV=development
|
||||
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["npm", "run", "dev"]
|
||||
Reference in New Issue
Block a user