version: '3.8' services: api: image: registry.boss160.cn/junhong/cmp-fiber-api:latest container_name: junhong-cmp-api restart: unless-stopped ports: - "3000:3000" environment: - DB_HOST=cxd.whcxd.cn - DB_PORT=16159 - DB_USER=erp_pgsql - DB_PASSWORD=erp_2025 - DB_NAME=junhong_cmp_test - DB_SSLMODE=disable volumes: - ./configs:/app/configs:ro - ./logs:/app/logs networks: - junhong-network healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/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 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