GALS API

Docs hosting

The documentation site is built as a static HTML/CSS/JS bundle and served from Azure Container Instances next to the API. Mintlify Cloud is not required. Official Mintlify self-host / static-export APIs are Enterprise-only; this project uses the community staticmint exporter against a pinned mint CLI version.

Build pipeline

On main, after the API image build:

1. Generate docs/api-reference/openapi.json from Service.dll with Swashbuckle CLI. 2. Run scripts/Build-DocsStatic.sh (mint + staticmint) to produce docs/out. 3. Build Dockerfile.docs (nginx) and push gals-docs to ACR. 4. Update ACI group aci-gals-docs-dev with scripts/Update-AciImage.sh. 5. Smoke-check that the public docs URL returns the oauth2-proxy auth redirect.

ACI layout

Provision the container group in gals.infrastructure.terraform (not in this repository). An illustrative multi-container shape is checked in as oauth2-proxy.aci.example.yaml for Terraform authors.

Expected layout:

ContainerImageRole
gals-docs-proxyquay.io/oauth2-proxy/oauth2-proxyPublic entrypoint; Entra ID OIDC; proxies to nginx
gals-docsacrgalsdevc98f.azurecr.io/gals-docs:<tag>Serves the static export on an internal port

Suggested oauth2-proxy flags (values come from Key Vault / Terraform):

<pre><code class="language-text">--provider=oidc --oidc-issuer-url=https://login.microsoftonline.com/&lt;tenant-id&gt;/v2.0 --client-id=&lt;docs-app-client-id&gt; --client-secret=&lt;from-key-vault&gt; --cookie-secret=&lt;from-key-vault&gt; --email-domain=&lt;mca-email-domain&gt; --upstream=http://127.0.0.1:8080 --http-address=0.0.0.0:4180 --redirect-url=https://&lt;docs-fqdn&gt;/oauth2/callback --cookie-secure=true --cookie-httponly=true

TLS termination should follow the same pattern used for the API ACI (Caddy sidecar on PTL DEV, or Cloudflare on MITA DEV).

Entra ID app registration checklist

Create a dedicated docs app registration (separate from the API and portal SPA):

1. Platform: Web โ€” redirect URI https://<docs-fqdn>/oauth2/callback. 2. Enable ID tokens for the oauth2-proxy OIDC flow. 3. Restrict access to the MCA tenant / security group used by internal staff. 4. Store client-secret and a random cookie-secret in Key Vault; inject them as ACI secure environment variables. 5. Do not reuse the API audience โ€” docs auth only gates reading the static site.

Static export limitations

FeatureBehaviour in ACI static bundle
Full-text searchSearch POSTs to /api/search and needs a backend; not available in the static export
OpenAPI .md download linksReturn 404 (no MDX source for generated pages)
PrintGuide pages use Print this page; API pages use browser print + shared print CSS

If search or first-party static export becomes a hard requirement, evaluate Mintlify Enterprise self-host / static-export API.

Terraform prerequisites

Before the Docs pipeline stage can succeed:

Update-AciImage.sh fails fast if the container group does not exist โ€” apply Terraform first, then re-run the pipeline.