services: db: image: postgres:18-alpine restart: unless-stopped environment: POSTGRES_USER: hoyo POSTGRES_PASSWORD: postgres_password POSTGRES_DB: hoyo_codes volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U hoyo -d hoyo_codes"] interval: 5s timeout: 5s retries: 5 api: image: ghcr.io/seriaati/hoyo-codes:latest restart: unless-stopped ports: - "1078:1078" environment: DATABASE_URL: postgresql://hoyo:postgres_password@db:5432/hoyo_codes API_TOKEN: my_api_token HOST: 0.0.0.0 PORT: 1078 volumes: - ./cookies.json:/app/cookies.json - ./uids.json:/app/uids.json - app_logs:/app/logs depends_on: db: condition: service_healthy healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:$${PORT}/health"] interval: 30s timeout: 5s retries: 3 start_period: 10s volumes: postgres_data: app_logs: