services: # ─────────────────────────────────────────────────────────────────────────── # 1. .NET API # ─────────────────────────────────────────────────────────────────────────── api: container_name: opencand_api restart: unless-stopped image: git.ivanch.me/ivanch/opencand.api:latest ports: - "5100:8080" depends_on: db: condition: service_healthy environment: ASPNETCORE_ENVIRONMENT: "Production" DatabaseSettings__ConnectionString: "Host=db;Port=5432;Database=opencand;Username=root;Password=root" FotosSettings__ApiBasePath: "https://api.opencand.ivanch.me/assets/fotos" volumes: - ./fotos_cand:/app/fotos_cand logging: driver: "json-file" options: max-size: "10m" max-file: "3" labels: "service=api" labels: - "promtail.enable=true" - "promtail.job=opencand-api" # ─────────────────────────────────────────────────────────────────────────── # 2. React + Vite Front‐end # ─────────────────────────────────────────────────────────────────────────── frontend: container_name: opencand_frontend restart: unless-stopped image: git.ivanch.me/ivanch/opencand.ui:latest ports: - "5110:80" depends_on: - api # ─────────────────────────────────────────────────────────────────────────── # 3. ETL (Optional: runs once at startup) # # If you want the ETL to run on every compose up, give it restart: "no" or # some other policy. It will run, then exit. # # If you instead prefer to run ETL manually or via host cron, you can omit # this service and just `docker run myorg/etl:latest ...` on demand. # ─────────────────────────────────────────────────────────────────────────── etl: image: git.ivanch.me/ivanch/opencand.etl:latest container_name: opencand_etl restart: "no" depends_on: db: condition: service_healthy loki: condition: service_started environment: DatabaseSettings__ConnectionString: "Host=db;Port=5432;Database=opencand;Username=root;Password=root" ParserSettings_CandidatoCSVThreads: "40" BasePath: "etl-data" volumes: - ./etl-data:/app/etl-data logging: driver: "json-file" options: max-size: "10m" max-file: "3" labels: "service=etl" labels: - "promtail.enable=true" - "promtail.job=opencand-etl"