version: '3.8' services: api: image: registry.boss160.cn/junhong/cmp-fiber-api:latest container_name: junhong-cmp-api restart: unless-stopped ports: - "8088:8088" environment: - CONFIG_ENV=prod - DB_HOST=${DB_HOST} - DB_PORT=${DB_PORT} - DB_USER=${DB_USER} - DB_PASSWORD=${DB_PASSWORD} - DB_NAME=${DB_NAME} - DB_SSLMODE=${DB_SSLMODE} volumes: - ./configs:/app/configs:ro - ./logs:/app/logs - ./.env:/app/.env:ro networks: - junhong-network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8088/health"] interval: 30s timeout: 3s retries: 3 start_period: 10s logging: driver: "json-file" options: max-size: "10m" max-file: "3" worker: image: registry.boss160.cn/junhong/cmp-fiber-worker:latest container_name: junhong-cmp-worker restart: unless-stopped environment: - CONFIG_ENV=prod volumes: - ./configs:/app/configs:ro - ./logs:/app/logs networks: - junhong-network depends_on: api: condition: service_healthy logging: driver: "json-file" options: max-size: "10m" max-file: "3" networks: junhong-network: driver: bridge