Files
web/docker-compose.yml
2025-11-08 17:08:39 +08:00

38 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
services:
# 数字档案管理系统前端服务
digital-archive-frontend:
image: ${IMAGE_NAME:-digital-archive-frontend}:${IMAGE_TAG:-latest}
container_name: ${CONTAINER_NAME:-digital-archive-frontend}
ports:
- "${HOST_PORT:-80}:80"
networks:
- ${NETWORK_NAME:-proxy}
restart: ${RESTART_POLICY:-unless-stopped}
environment:
- NGINX_HOST=${NGINX_HOST:-localhost}
- NGINX_PORT=80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
# - ./ssl:/etc/nginx/ssl:ro # 如果需要SSL证书取消注释并配置证书文件
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
labels:
- "traefik.enable=true"
- "traefik.http.routers.${CONTAINER_NAME:-digital-archive-frontend}.rule=Host(`${DOMAIN_NAME:-localhost}`)"
- "traefik.http.routers.${CONTAINER_NAME:-digital-archive-frontend}.entrypoints=web"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
proxy:
external: ${EXTERNAL_NETWORK:-true}
name: ${NETWORK_NAME:-proxy}