diff --git a/api/app/settings/common.py b/api/app/settings/common.py index ee6f0399d5b6..865d66b3aef6 100644 --- a/api/app/settings/common.py +++ b/api/app/settings/common.py @@ -876,7 +876,10 @@ DISABLE_WEBHOOKS = env.bool("DISABLE_WEBHOOKS", False) -SERVE_FE_ASSETS = os.path.exists(BASE_DIR + "/app/templates/webpack/index.html") +DISABLE_FLAGSMITH_UI = env.bool("DISABLE_FLAGSMITH_UI", default=False) +SERVE_FE_ASSETS = not DISABLE_FLAGSMITH_UI and os.path.exists( + BASE_DIR + "/app/templates/webpack/index.html" +) # Used to configure the number of application proxies that the API runs behind NUM_PROXIES = env.int("NUM_PROXIES", 1) diff --git a/docs/docs/deployment/hosting/locally-api.md b/docs/docs/deployment/hosting/locally-api.md index b2b90322ab8e..9915f9a23ae6 100644 --- a/docs/docs/deployment/hosting/locally-api.md +++ b/docs/docs/deployment/hosting/locally-api.md @@ -243,6 +243,8 @@ the below variables will be ignored. - `FLAGSMITH_DOMAIN`: A custom domain for URLs pointing to your Flagsmith instance in email notifications. Note: if set, the domain provided during [initial configuration](#environments-with-no-direct-console-access-eg-heroku-ecs) will be ignored. +- `DISABLE_FLAGSMITH_UI`: Disable the Flagsmith UI which can be rendered by the API containers in a single container + environment. Use `True` to disable, defaults to `False`. #### Security Environment Variables