services:
  mttu-doc-web-inner:
    image: gitea.service.jazzwhom.top/mttu-developers/docs:latest
    restart: unless-stopped
    networks:
      - mttu-web-inner
  mttu-doc-web:
    restart: unless-stopped
    image: ghcr.io/techarohq/anubis:latest
    environment:
      - BIND=:80
      - TARGET=http://mttu-doc-web-inner:80
      - _RESTART_DUMMY=6
      - REDIRECT_DOMAINS=*.jazzwhom.top,jazzwhom.top,*.passthem.top,passthem.top
      - POLICY_FNAME=/data/cfg/botPolicy.yaml
    healthcheck:
      test:
        - CMD
        - anubis
        - --healthcheck
      interval: 5s
      timeout: 30s
      retries: 5
      start_period: 500ms
    networks:
      - mttu-web-inner
      - caddy-internal
    volumes:
      - /opt/anubis/botPolicies.yaml:/data/cfg/botPolicy.yaml:ro

networks:
  caddy-internal:
    external: true
  mttu-web-inner:
    driver: bridge
