- Suppression write-docker-creds et secrets docker_registry/username/password
- build-backend/frontend : docker build local sur sonic (docker.sock)
- sbom-generate : scan des images locales via docker.sock
- docker-compose.yml : ajout image: libredecision-{backend,frontend}:latest
- deploy : suppression docker compose pull (images locales)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
88 lines
2.7 KiB
YAML
88 lines
2.7 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-libredecision}
|
|
POSTGRES_USER: ${POSTGRES_USER:-libredecision}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me-in-production}
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-libredecision} -d ${POSTGRES_DB:-libredecision}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
networks:
|
|
- libredecision
|
|
|
|
backend:
|
|
image: libredecision-backend:latest
|
|
build:
|
|
context: ../
|
|
dockerfile: docker/backend.Dockerfile
|
|
target: production
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-libredecision}:${POSTGRES_PASSWORD:-change-me-in-production}@postgres:5432/${POSTGRES_DB:-libredecision}
|
|
SECRET_KEY: ${SECRET_KEY:-change-me-in-production-with-a-real-secret-key}
|
|
DEBUG: "false"
|
|
CORS_ORIGINS: '["https://${DOMAIN:-libredecision.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.libredecision-api.rule=Host(`${DOMAIN:-libredecision.org}`) && PathPrefix(`/api`)"
|
|
- "traefik.http.routers.libredecision-api.entrypoints=websecure"
|
|
- "traefik.http.routers.libredecision-api.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.libredecision-api.loadbalancer.server.port=8002"
|
|
networks:
|
|
- libredecision
|
|
- traefik
|
|
|
|
frontend:
|
|
image: libredecision-frontend:latest
|
|
build:
|
|
context: ../
|
|
dockerfile: docker/frontend.Dockerfile
|
|
target: production
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- backend
|
|
environment:
|
|
NUXT_PUBLIC_API_BASE: https://${DOMAIN:-libredecision.org}/api/v1
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.libredecision-front.rule=Host(`${DOMAIN:-libredecision.org}`)"
|
|
- "traefik.http.routers.libredecision-front.entrypoints=websecure"
|
|
- "traefik.http.routers.libredecision-front.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.libredecision-front.loadbalancer.server.port=3000"
|
|
networks:
|
|
- libredecision
|
|
- traefik
|
|
|
|
ipfs:
|
|
image: ipfs/kubo:latest
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ipfs-data:/data/ipfs
|
|
networks:
|
|
- libredecision
|
|
|
|
volumes:
|
|
postgres-data:
|
|
ipfs-data:
|
|
|
|
networks:
|
|
libredecision:
|
|
driver: bridge
|
|
traefik:
|
|
external: true
|