services:
  forgejo:
    environment:
      USER_UID: "${HOST_UID}"
      USER_GID: "${HOST_GID}"

      FORGEJO__server__DOMAIN: "code.${ALT_ROOT_DOMAIN}"
      FORGEJO__server__ROOT_URL: "https://code.${ALT_ROOT_DOMAIN}"
      FORGEJO__server__SSH_DOMAIN: "code.${ALT_ROOT_DOMAIN}"

    labels:
    # Websecure
      traefik.http.routers.forgejo-more.rule: Host(`code.${ROOT_DOMAIN}`)${APP_ROUTE_OPTIONAL:-}
      traefik.http.routers.forgejo-more.entrypoints: websecure
      traefik.http.routers.forgejo-more.service: forgejo
    # traefik.http.routers.forgejo-more.middlewares: authentik_sysmgr@file
      traefik.http.routers.forgejo-more.tls: true
      traefik.http.routers.forgejo-more.tls.certresolver: myresolver
