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>
86 lines
2.6 KiB
YAML
86 lines
2.6 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-glibredecision}
|
|
POSTGRES_USER: ${POSTGRES_USER:-glibredecision}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me-in-production}
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-glibredecision} -d ${POSTGRES_DB:-glibredecision}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
networks:
|
|
- glibredecision
|
|
|
|
backend:
|
|
build:
|
|
context: ../
|
|
dockerfile: docker/backend.Dockerfile
|
|
target: production
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-glibredecision}:${POSTGRES_PASSWORD:-change-me-in-production}@postgres:5432/${POSTGRES_DB:-glibredecision}
|
|
SECRET_KEY: ${SECRET_KEY:-change-me-in-production-with-a-real-secret-key}
|
|
DEBUG: "false"
|
|
CORS_ORIGINS: '["https://${DOMAIN:-glibredecision.org}"]'
|
|
DUNITER_RPC_URL: ${DUNITER_RPC_URL:-wss://gdev.p2p.legal/ws}
|
|
IPFS_API_URL: http://ipfs:5001
|
|
IPFS_GATEWAY_URL: http://ipfs:8080
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.glibredecision-api.rule=Host(`${DOMAIN:-glibredecision.org}`) && PathPrefix(`/api`)"
|
|
- "traefik.http.routers.glibredecision-api.entrypoints=websecure"
|
|
- "traefik.http.routers.glibredecision-api.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.glibredecision-api.loadbalancer.server.port=8002"
|
|
networks:
|
|
- glibredecision
|
|
- traefik
|
|
|
|
frontend:
|
|
build:
|
|
context: ../
|
|
dockerfile: docker/frontend.Dockerfile
|
|
target: production
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- backend
|
|
environment:
|
|
NUXT_PUBLIC_API_BASE: https://${DOMAIN:-glibredecision.org}/api/v1
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.glibredecision-front.rule=Host(`${DOMAIN:-glibredecision.org}`)"
|
|
- "traefik.http.routers.glibredecision-front.entrypoints=websecure"
|
|
- "traefik.http.routers.glibredecision-front.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.glibredecision-front.loadbalancer.server.port=3000"
|
|
networks:
|
|
- glibredecision
|
|
- traefik
|
|
|
|
ipfs:
|
|
image: ipfs/kubo:latest
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ipfs-data:/data/ipfs
|
|
networks:
|
|
- glibredecision
|
|
|
|
volumes:
|
|
postgres-data:
|
|
ipfs-data:
|
|
|
|
networks:
|
|
glibredecision:
|
|
driver: bridge
|
|
traefik:
|
|
external: true
|