# Extension Registry Configuration - Enterprise Example
# High-availability, multi-source, multi-registry production deployment

[server]
host = "0.0.0.0"
port = 8082
workers = 8
enable_cors = true
enable_compression = true

# Primary internal Gitea instance
[[sources.gitea]]
id = "primary-internal-gitea"
url = "https://gitea.internal.company.com"
organization = "platform-extensions"
token_path = "/etc/secrets/gitea-primary-token.txt"
timeout_seconds = 30
verify_ssl = true

# Secondary internal Gitea (failover)
[[sources.gitea]]
id = "secondary-internal-gitea"
url = "https://gitea-secondary.internal.company.com"
organization = "platform-extensions"
token_path = "/etc/secrets/gitea-secondary-token.txt"
timeout_seconds = 30
verify_ssl = true

# Forgejo for community extensions
[[sources.forgejo]]
id = "enterprise-forgejo"
url = "https://forge.company.com"
organization = "platform"
token_path = "/etc/secrets/forgejo-token.txt"
timeout_seconds = 30
verify_ssl = true

# GitHub organization
[[sources.github]]
id = "company-github"
organization = "company-platform"
token_path = "/etc/secrets/github-token.txt"
timeout_seconds = 30
verify_ssl = true

# Primary enterprise OCI registry (Zot)
[[distributions.oci]]
id = "primary-oci-zot"
registry = "zot.internal.company.com"
namespace = "platform/extensions"
timeout_seconds = 30
verify_ssl = true

# Secondary enterprise OCI registry (Harbor)
[[distributions.oci]]
id = "secondary-oci-harbor"
registry = "harbor.internal.company.com"
namespace = "platform"
auth_token_path = "/etc/secrets/harbor-token.txt"
timeout_seconds = 30
verify_ssl = true

# Public Docker Hub for external distribution
[[distributions.oci]]
id = "public-docker-hub"
registry = "docker.io"
namespace = "company-open-source"
auth_token_path = "/etc/secrets/docker-hub-token.txt"
timeout_seconds = 30
verify_ssl = true

# Public GHCR for open-source projects
[[distributions.oci]]
id = "public-ghcr"
registry = "ghcr.io"
namespace = "company-open-source"
auth_token_path = "/etc/secrets/ghcr-token.txt"
timeout_seconds = 30
verify_ssl = true

# Caching configuration for high-traffic enterprise environment
[cache]
capacity = 5000
ttl_seconds = 600
enable_metadata_cache = true
enable_list_cache = true
