services: zhinian-go-api: build: context: ./backend dockerfile: Dockerfile.alpine image: zhinian-go-api:latest container_name: zhinian-go-api restart: unless-stopped working_dir: /app env_file: - .env.local environment: NODE_ENV: production GO_BACKEND_HOST: 0.0.0.0 GO_BACKEND_PORT: 8080 ZHINIAN_GO_EMBEDDED_WORKER: "true" ZHINIAN_RUNTIME_DIR: /var/lib/zhinian/runtime ZHINIAN_LOG_DIR: /var/lib/zhinian/logs ZHINIAN_SETTINGS_FILE: /app/.env.local expose: - "8080" volumes: - ./.env.local:/app/.env.local - runtime-data:/var/lib/zhinian healthcheck: test: - CMD - wget - -q - -O - /dev/null - http://127.0.0.1:8080/api/health interval: 15s timeout: 5s retries: 5 start_period: 20s zhinian-web: build: context: . dockerfile: Dockerfile image: zhinian-aigc:latest container_name: zhinian-web restart: unless-stopped depends_on: zhinian-go-api: condition: service_healthy ports: - "${APP_PORT:-3000}:3000" volumes: - ./deploy/nginx-compose.conf:/etc/nginx/nginx.conf:ro healthcheck: test: - CMD - wget - -q - -O - /dev/null - http://127.0.0.1:3000/healthz interval: 30s timeout: 5s retries: 5 start_period: 10s volumes: runtime-data: