Configuration

The portals are configured at container start time, not at build time, so the same image runs across environments without a rebuild.

Runtime config: app-config.json

Each portal ships an Angular runtime configuration file under its assets. AppConfigService (@ft/common/services) loads assets/app-config.json before the application bootstraps and keeps it in a static field, so a missing or malformed file stops start-up with Could not load the config file.

Sources in this repository:

projects/support-center/src/assets/app-config.json
projects/management-console/src/assets/app-config.json

In the running container the same files are served from the Nginx document root — note the browser/ level introduced by the Angular 19 application builder:

/usr/share/nginx/html/support-center/browser/assets/app-config.json
/usr/share/nginx/html/management-console/browser/assets/app-config.json

Fields:

Field Meaning

company, appName

Branding shown in the UI (Support Portal / Management Portal).

moreInformationUrl

Link target for the product information entry.

server.api

Base URL every REST call is built on. ApiService appends iotw/<path> to it.

server.ws

WebSocket endpoint placeholder (# when unused).

pull.enable, pull.interval

Client-side polling switch and interval in milliseconds.

The key field is server.api. The container entrypoint patches it with jq at startup:

.server.api = "/iot-webservice/"

A relative path: the browser calls the portals origin, and Nginx proxies the request to the address configured in FT_UI_BACKEND_URL. Running from source, the checked-in absolute development URL is used instead, so no proxy is involved.

Startup sequence

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

  1. Render nginx.conf — envsubst expands the upstream URLs, METRICS_ALLOW_IP and the DNS resolver into /etc/nginx/nginx.conf.template.

  2. Patch runtime config — rewrite .server.api in each app’s app-config.json.

  3. Upload portal permissions — one PUT per portal to the backend, tagged by client type (sc = Support Portal, mc = Management Portal) and authenticated with the internal keyword header.

  4. Start Nginx — serve both portals and proxy the upstreams.

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

Settings that come from the backend

Some behaviour is configured server-side and read at runtime through the settings API, not through app-config.json:

  • AIServiceConnectionURL — enables the AI assistant and provides its base URL.

  • The Grafana dashboard URLs used by the system-overview pages.

  • Portal permissions per user group, uploaded by the entrypoint and enforced by the backend.

Environment variables

The container environment variables that drive the startup sequence — their names, defaults, whether each is required, and a complete .env example — are documented once, in Installation & Deployment — Environment Configuration.