---
url: /on-premises/config/env/platform_back.md
---
# BIMData Platform Back

## URLs of BIMData apps

| Variables         | Default value  | Description                 |
|-------------------|----------------|-----------------------------|
| API\_URL           | ""             | BIMData API URL.            |
| PLATFORM\_URL      | ""             | BIMData platform front URL. |
| PLATFORM\_BACK\_URL | ""             | BIMData platform back URL.  |

## Database configuration

There variables are needed for the database authentication.

| Variables            | Default value    | Description                |
|----------------------|------------------|----------------------------|
| DB\_HOST              |                  | Postgresql server address. |
| DB\_PORT              |                  | Postgresql server port.    |
| DB\_NAME              |                  | Postgresql database name.  |
| DB\_USER              |                  | Postgresql user.           |
| DB\_PASSWORD          |                  | Postgresql password.       |

If your Postgresql cluster use read-only replicas, you can configure the API
with these variables to distribute the read-only requests through all of them.
Each of these variable is a comma separated list. If each replica have a different
configuration, the order in each list matter: the first element `REPLICA_DB_HOSTS`
will use the first port in `REPLICA_DB_PORTS` and so on.

| Variables            | Default value       | Description                                           |
|----------------------|---------------------|-------------------------------------------------------|
| REPLICA\_DB\_HOSTS     | None                | list of postgresql read-only replicas server address. |
| REPLICA\_DB\_PORTS     | Same as DB\_PORT     | list of postgresql read-only replicas server port.    |
| REPLICA\_DB\_NAMES     | Same as DB\_NAME     | list of postgresql read-only database name.           |
| REPLICA\_DB\_USERS     | Same as DB\_USER     | list of postgresql read-only database user.           |
| REPLICA\_DB\_PASSWORDS | Same as DB\_PASSWORD | list of postgresql read-only database user.           |

## OpenID configuration

::: v-pre
| Variables         | Default value | Description            |
|-------------------|---------------|------------------------|
| IAM\_URL           |               | OIDC provider address. |
| IAM\_CLIENT\_ID     |               | OIDC client ID.        |
| IAM\_CLIENT\_SECRET |               | OIDC client secret.    |
:::

## Email configuration

| Variables            | Default value        | Description                   |
|----------------------|----------------------|-------------------------------|
| SMTP\_HOST            |                      | SMTP server address.          |
| SMTP\_PORT            |                      | SMTP server port.             |
| SMTP\_USE\_TLS         |                      | SMTP communication use TLS.   |
| SMTP\_USER            |                      | SMTP authentication user.     |
| SMTP\_PASS            |                      | SMTP authentication password. |
| DEFAULT\_FROM\_EMAIL   | "support@bimdata.io" | SMTP default from email.      |

### Image configuration

| Variables            | Default value | Description                                            |
|----------------------|---------------|--------------------------------------------------------|
| WORKERS              | 4             | Configure Gunicorn workers.                            |
| PORT                 | 8000          | Configure Gunicorn listen port.                        |
| CA\_CERT              | ""            | Path of a certificate to add to container trusted CAs. |
| COMPILE\_SCSS         | 0             | 0 or 1. Configure if django compilescss during init.   |
| COLLECT\_STATIC       | 1             | 0 or 1. Configure if django collectstatic during init. |
| APPLY\_MIGRATION      | 1             | 0 or 1. Configure if django migrate during init.       |
| PROCESS\_TASKS        | 0             | 0 or 1. Configure if django process\_tasks.             |

## Other configuration

| Variables                        | Default value                          | Description                                        |
|----------------------------------|----------------------------------------|----------------------------------------------------|
| ENV                              | "development"                          |                                                    |
| ALLOWED\_HOSTS                    | \[]                                     |                                                    |
| DEBUG                            | False                                  |                                                    |
| ADMIN\_INTERFACE                  |                                        | Use to be able to deploy separate admin interface. |
| DJANGO\_SETTINGS\_MODULE           | "platform\_back.settings.platform\_back" | Use to be able to deploy separate admin interface. |
| SECRET\_KEY                       | "SET\_DEVELOPMENT\_DJANGO\_SECRET\_KEY"    |                                                    |
| WEBHOOKS\_SECRET                  | ""                                     |                                                    |
| MASTER\_TOKEN                     | ""                                     |                                                    |
| REQUESTS\_CA\_BUNDLE               | ""                                     |                                                    |
