# Nginx Proxy Manager - Reverse Proxy with GUI
# Docs: https://nginxproxymanager.com/
# Deployed to: Calypso (DS723+)
# Domains: *.vish.gg, *.thevish.io
#
# REPLACES: Synology DSM Reverse Proxy
# INTEGRATES: Authentik SSO via Forward Auth
#
# PORTS:
# - 80: HTTP (redirect to HTTPS)
# - 443: HTTPS (main proxy)
# - 81: Admin UI
#
# DISASTER RECOVERY:
# - Config: /volume1/docker/nginx-proxy-manager/data
# - SSL Certs: /volume1/docker/nginx-proxy-manager/letsencrypt
# - Database: SQLite in data directory

services:
  nginx-proxy-manager:
    image: jc21/nginx-proxy-manager:latest
    container_name: nginx-proxy-manager
    restart: unless-stopped
    ports:
      # Using alternate ports during migration (Synology nginx on 80/443)
      # Change to 80:80 and 443:443 after migration complete
      - "8880:80"    # HTTP (temp port)
      - "8443:443"   # HTTPS (temp port)
      - "81:81"      # Admin UI
    environment:
      # Disable IPv6 if not needed
      DISABLE_IPV6: "true"
    volumes:
      - /volume1/docker/nginx-proxy-manager/data:/data
      - /volume1/docker/nginx-proxy-manager/letsencrypt:/etc/letsencrypt
    networks:
      - npm-network
    healthcheck:
      test: ["CMD", "/bin/check-health"]
      interval: 30s
      timeout: 10s
      retries: 3

networks:
  npm-network:
    driver: bridge
