Configuration

The Provision Portal UI is configured at container start time, not at build time, so the same image runs across environments without a rebuild.

Runtime config: app.config.json

The app ships an Angular runtime configuration file under its assets:

/usr/share/nginx/html/provision-portal/assets/config/app.config.json

Its single field is apiUrl — the base path the browser uses to call the backend. The container entrypoint patches it at startup to the fixed relative value:

{ "apiUrl": "/prov-api/" }

The browser calls the same-origin path /prov-api/…​; Nginx reverse-proxies it to the real backend (FT_PROV_API_URL). This avoids browser CORS and keeps the artifact origin-agnostic.

In local development there is no proxy, so src/assets/config/app.config.json holds an absolute backend URL instead; the repository README covers the local development workspace.

How the app reads it

app.config.json is loaded through an Angular APP_INITIALIZER:

APP_INITIALIZER -> ConfigService.loadConfig() -> GET assets/config/app.config.json

loadConfig() runs before the application boots and caches the result, so ApiService.baseUrl (= config.apiUrl) is available to the first HTTP call. If the config has not loaded, ConfigService.config throws — boot ordering guarantees it has.

Startup sequence

On start, docker/ops/entrypoint.sh performs two steps before Nginx serves traffic:

  1. Render nginx.conf from nginx.conf.template with envsubst, substituting ${FT_PROV_API_URL} into the /prov-api/ proxy_pass.

  2. Patch runtime config — rewrite .apiUrl in app.config.json to /prov-api/ with jq.

Then it execs nginx -g 'daemon off;'.

See Installation & Deployment for the exact commands and the verification steps that confirm the render and patch succeeded.

Environment variables

Environment variables

These variables configure the Provision Portal UI container at deploy time. See Installation & Deployment for the full deployment example.

FT_PROV_API_URL

Upstream URL used by Nginx proxy_pass for the /prov-api/ location. Point it at the backend’s /prov-portal/ context path. The browser’s API base is not configured here — the entrypoint fixes it to the relative path /prov-api/.
Default: http://prov-api:8880/prov-portal/
Example: http://provision-portal:8080/prov-portal/

TLS is not driven by an environment variable. The shipped Nginx config always listens on 443 and reads /etc/nginx/ssl/friendly.crt + friendly.key; mount them via a volume. See Installation & Deployment — TLS Certificate.