version: '3.8' services: # 前端服务 digital-archive-frontend: build: context: . dockerfile: Dockerfile container_name: digital-archive-frontend ports: - "80:80" networks: - proxy restart: unless-stopped environment: - NGINX_HOST=localhost - NGINX_PORT=80 volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro - ./ssl:/etc/nginx/ssl:ro healthcheck: test: ["CMD", "curl", "-f", "http://localhost/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s networks: proxy: external: true