# Docker-Compose voor Portainer (remote deployment) # Images worden automatisch gebouwd via GitHub Actions en gehost in GitHub Container Registry (GHCR) version: '3.9' services: db: image: postgres:15-alpine container_name: transit_db environment: POSTGRES_DB: ${POSTGRES_DB:-transit_db} POSTGRES_USER: ${POSTGRES_USER:-transit_user} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-transit_password} ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-transit_user}"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped auth_api: # Images van GitHub Container Registry image: ghcr.io/YOUR_USERNAME/YOUR_REPO/auth_api:latest # Of specifieke tag (bijv. bij versioning): # image: ghcr.io/YOUR_USERNAME/YOUR_REPO/auth_api:v1.0.0 container_name: auth_api ports: - "5000:5000" environment: PORT: 5000 JWT_SECRET: ${JWT_SECRET:-your_jwt_secret_key} DB_HOST: db DB_PORT: 5432 DB_NAME: ${POSTGRES_DB:-transit_db} DB_USER: ${POSTGRES_USER:-transit_user} DB_PASSWORD: ${POSTGRES_PASSWORD:-transit_password} depends_on: db: condition: service_healthy restart: unless-stopped # Als je private registry gebruikt, voeg toe: # pull_policy: always employee_api: image: ghcr.io/YOUR_USERNAME/YOUR_REPO/employee_api:latest container_name: employee_api ports: - "4000:4000" environment: PORT: 4000 DB_HOST: db DB_PORT: 5432 DB_NAME: ${POSTGRES_DB:-transit_db} DB_USER: ${POSTGRES_USER:-transit_user} DB_PASSWORD: ${POSTGRES_PASSWORD:-transit_password} depends_on: db: condition: service_healthy restart: unless-stopped transit_api: image: ghcr.io/YOUR_USERNAME/YOUR_REPO/transit_api:latest container_name: transit_api ports: - "5001:5001" environment: PORT: 5001 JWT_SECRET: ${JWT_SECRET:-your_jwt_secret_key} DB_HOST: db DB_PORT: 5432 DB_NAME: ${POSTGRES_DB:-transit_db} DB_USER: ${POSTGRES_USER:-transit_user} DB_PASSWORD: ${POSTGRES_PASSWORD:-transit_password} depends_on: db: condition: service_healthy restart: unless-stopped volumes: postgres_data: driver: local