Skip to content

BIMData Connect

URLs of BIMData apps

VariablesDefault valueDescription
SITE_URL""BIMData Connect URL.
API_URL""BIMData API URL.
DOC_URL""BIMData Documentation URL.
PLATFORM_URL""BIMData Platform URL.

Database configuration

There variables are needed for the database authentication.

VariablesDefault valueDescription
DB_HOSTPostgresql server address.
DB_PORTPostgresql server port.
DB_NAMEPostgresql database name.
DB_USERPostgresql user.
DB_PASSWORDPostgresql 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.

VariablesDefault valueDescription
REPLICA_DB_HOSTS""list of postgresql read-only replicas server address.
REPLICA_DB_PORTSSame as DB_PORTlist of postgresql read-only replicas server port.
REPLICA_DB_NAMESSame as DB_NAMElist of postgresql read-only database name.
REPLICA_DB_USERSSame as DB_USERlist of postgresql read-only database user.
REPLICA_DB_PASSWORDSSame as DB_PASSWORDlist of postgresql read-only database user.

OpenID configuration

VariablesDefault valueDescription
IAM_URL""OIDC provider address.
IAM_ADMIN_LOGIN""OIDC admin username.
IAM_ADMIN_PASSWORD""OIDC admin password.

Storage configuration

By default, the API use a local storage in /opt/storage to store all the uploaded datas. But these datas are not serve by the API itself. It's necessary to configure a web server, like other static files. That's why we recommande using an object storage for production.

To enable Swift usage, you need to set SWIFT_AUTH_URL, and if this variable is set, alors the other variables SWIFT_* need to be set.

VariablesDefault valueDescription
SWIFT_AUTH_URLThe URL for the auth server.
SWIFT_USERNAMEThe username to use to authenticate.
SWIFT_PASSWORDThe key (password) to use to authenticate.
SWIFT_AUTH_VERSION3The version of the authentication protocol to use.
SWIFT_TENANT_NAME / SWIFT_PROJECT_NAMENoneThe tenant/project name to use when authenticating.
SWIFT_TENANT_ID / SWIFT_PROJECT_IDNoneThe tenant/project id to use when authenticating.
SWIFT_USER_DOMAIN_NAMENoneThe domain name we authenticate to.
SWIFT_USER_DOMAIN_ID"default"The domain id we authenticate to.
SWIFT_PROJECT_DOMAIN_NAME"default"The domain name our project is located in.
SWIFT_PROJECT_DOMAIN_IDNoneThe domain id our project is located in.
SWIFT_REGION_NAMENoneOpenStack region if needed. Check with your provider.
SWIFT_CONTAINER_NAMENoneThe container in which to store the files.
SWIFT_STATIC_CONTAINER_NAMENoneAlternate container for storing staticfiles.
SWIFT_AUTO_CREATE_CONTAINERTrueShould the container be created if it does not exist?
SWIFT_AUTO_CREATE_CONTAINER_PUBLICFalseSet the auto created container as public on creation
SWIFT_AUTO_CREATE_CONTAINER_ALLOW_ORIGIN"*"Set the container's X-Container-Meta-Access-Control-Allow-Origin value, to support CORS requests.
SWIFT_AUTO_BASE_URLTrueQuery the authentication server for the base URL.
SWIFT_BASE_URLNoneThe base URL from which the files can be retrieved.
SWIFT_NAME_PREFIX""Prefix that gets added to all filenames.
SWIFT_EXTRA_OPTIONS{}Extra options.
SWIFT_STATIC_AUTO_BASE_URLTrueQuery the authentication server for the static base URL.
SWIFT_STATIC_BASE_URLNoneThe base URL from which the static files can be retrieved,
SWIFT_STATIC_NAME_PREFIXNonePrefix that gets added to all static filenames.
SWIFT_CONTENT_TYPE_FROM_FDFalseDetermine the files mimetypes from the actual content rather than from their filename (default).
SWIFT_FULL_LISTINGTrueEnsures to get whole directory contents (by default swiftclient limits it to 10000 entries)
SWIFT_AUTH_TOKEN_DURATION60 * 60 * 23How long a token is expected to be valid in seconds.
SWIFT_LAZY_CONNECTTrueIf True swift connection will be obtained on first use, if False it will be obtained during storage instantiation.
SWIFT_GZIP_CONTENT_TYPES[None,"text/plain","application/json","application/octet-stream","image/svg+xml","text/xml"]List of content type that will be compressed.
SWIFT_GZIP_COMPRESSION_LEVEL4Gzip compression level from 0 to 9. 0 = no compression, 9 = max compression
SWIFT_GZIP_UNKNOWN_CONTENT_TYPETrueIf set to True and the content-type can't be guessed, gzip anyway
SWIFT_CACHE_HEADERSFalseHeaders cache on/off switcher

Email configuration

VariablesDefault valueDescription
SMTP_HOSTNoneSMTP server address.
SMTP_PORTSMTP server port.
SMTP_USE_TLSSMTP communication use TLS.
SMTP_USERSMTP authentication user.
SMTP_PASSSMTP authentication password.
DEFAULT_FROM_EMAIL"no-reply@bimdata.io"SMTP default from email.

Image configuration

VariablesDefault valueDescription
WORKERS4Configure Gunicorn workers.
PORT8000Configure Gunicorn listen port.
CA_CERT""Path of a certificate to add to container trusted CAs.
COMPILE_SCSS00 or 1. Configure if django compilescss during init.
COLLECT_STATIC10 or 1. Configure if django collectstatic during init.
APPLY_MIGRATION10 or 1. Configure if django migrate during init.
PROCESS_TASKS00 or 1. Configure if django process_tasks.

Other configuration

VariablesDefault valueDescription
API_TOKEN""
INVITATION_SECRET""
INVITATION_CLIENT_ID""
INVITATION_CLIENT_SECRET""
SECRET_KEY"SET_DEVELOPMENT_DJANGO_SECRET_KEY"
ENV"development"
ALLOWED_HOSTS[]
ADMIN_INTERFACEFalse
ADMIN_URL""
DEBUGFalse
DATA_UPLOAD_MAX_MEMORY_SIZE1 * 1024 ** 3