# ================================================
# Level 1: 基础设施服务
# Nacos, MinIO, Nginx, Jitsi Meet
# ================================================

services:
  # ====================== Nginx 反向代理 ======================
  nginx:
    image: nginx:alpine
    container_name: urban-lifeline-nginx
    restart: unless-stopped
    networks:
      - urban-lifeline
    ports:
      - "80:80"
      - "443:443"
    environment:
      TZ: Asia/Shanghai
    volumes:
      - ${LOG_ROOT:-./volumes/nginx/logs}:/var/log/nginx
      - ${CONFIG_FILE_ROOT:-./volumes/nginx.conf}:/etc/nginx/nginx.conf:ro
      - ${CONFIG_ROOT:-./volumes/conf.d}:/etc/nginx/conf.d:ro
      # SSL 证书（可选）
      - ${SSL_ROOT:-./volumes/cert}:/etc/nginx/ssl:ro
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 30s
  
networks:
  urban-lifeline:
    name: urban-lifeline
