# Pangolin Resource Definitions
# All resources route through Nginx (port 80) by default
# Newt tunnel → Nginx (port 80) → Backend containers (various ports)
#
# target_ip: the hostname/IP that Newt sends traffic to (default: nginx)
# target_port: the port on the target host (default: 80)

resources:
  # Required services (fail if down)
  - subdomain: app
    name: Admin GUI
    container: changemaker-v2-admin
    port: 3000
    target_ip: nginx
    target_port: 80
    required: true

  - subdomain: api
    name: API Server
    container: changemaker-v2-api
    port: 4000
    target_ip: nginx
    target_port: 80
    required: true

  - subdomain: ""  # Root domain
    name: Public Site
    container: mkdocs-site-server-changemaker
    port: 80
    target_ip: nginx
    target_port: 80
    required: true

  # Optional services (warn and skip if down)
  - subdomain: db
    name: NocoDB
    container: changemaker-v2-nocodb
    port: 8080
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: docs
    name: Documentation
    container: mkdocs-changemaker
    port: 8000
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: code
    name: Code Server
    container: code-server-changemaker
    port: 8080
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: n8n
    name: Workflows
    container: n8n-changemaker
    port: 5678
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: git
    name: Gitea
    container: gitea-changemaker
    port: 3000
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: home
    name: Homepage
    container: homepage-changemaker
    port: 3000
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: listmonk
    name: Newsletter
    container: listmonk-app
    port: 9000
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: qr
    name: Mini QR
    container: mini-qr
    port: 8080
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: draw
    name: Excalidraw
    container: excalidraw-changemaker
    port: 80
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: vault
    name: Vaultwarden
    container: vaultwarden-changemaker
    port: 80
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: mail
    name: MailHog
    container: mailhog-changemaker
    port: 8025
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: chat
    name: Rocket.Chat
    container: rocketchat-changemaker
    port: 3000
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: events
    name: Gancio Events
    container: gancio-changemaker
    port: 13120
    target_ip: nginx
    target_port: 80
    required: false

  - subdomain: meet
    name: Jitsi Meet
    container: jitsi-web-changemaker
    port: 80
    target_ip: nginx
    target_port: 80
    required: false

  # Monitoring services (auto-detect profile)
  - subdomain: grafana
    name: Grafana
    container: grafana-changemaker
    port: 3000
    target_ip: nginx
    target_port: 80
    required: false
    profile: monitoring  # Auto-detect if monitoring profile active
