todo
This commit is contained in:
@@ -1,30 +1,38 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# 前端服务
|
||||
# 数字档案管理系统前端服务
|
||||
digital-archive-frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: digital-archive-frontend
|
||||
image: ${IMAGE_NAME:-digital-archive-frontend}:${IMAGE_TAG:-latest}
|
||||
container_name: ${CONTAINER_NAME:-digital-archive-frontend}
|
||||
ports:
|
||||
- "80:80"
|
||||
- "${HOST_PORT:-80}:80"
|
||||
networks:
|
||||
- proxy
|
||||
restart: unless-stopped
|
||||
- ${NETWORK_NAME:-proxy}
|
||||
restart: ${RESTART_POLICY:-unless-stopped}
|
||||
environment:
|
||||
- NGINX_HOST=localhost
|
||||
- NGINX_HOST=${NGINX_HOST:-localhost}
|
||||
- NGINX_PORT=80
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./ssl:/etc/nginx/ssl:ro
|
||||
# - ./ssl:/etc/nginx/ssl:ro # 如果需要SSL证书,取消注释并配置证书文件
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||
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: true
|
||||
external: ${EXTERNAL_NETWORK:-true}
|
||||
name: ${NETWORK_NAME:-proxy}
|
||||
Reference in New Issue
Block a user