Set configuration keys

Setting configuration keys for development and production are different processes. Please review the chapters according to your environment.

Set configuration keys for development

This guide describes the use of the .env file. The .env file is only used for development. The settings in the .env file are not included in a fdt connectors build. You need to set the configuration keys as environment variables in your production environment.

Configuration keys in a development environment have to be stored in a .env file. This allows you to run fdt connectors run multiple times without having to re-enter the configuration.

  1. Create a .env file, you can create the file in either:

    • The same directory as your created instance.

    • Another directory, in this case you'll have to pass its location when running your development build using fdt connectors run --config-location <environment-file-location>.

  2. Add the configuration keys with its value to the .env file in the format <key>=<value>.

For example:

.env

Shell

fc__cmis__enabled=true
fc__googleDrive__clientId=xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
fc__googleDrive__clientSecret=xxxxxxxxxxxxxxxxxxxxxxxx
fc__googleDrive__enabled=true
fc__logging__logLevel=Warning
fc__microsoftOneDrive__clientId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
fc__microsoftOneDrive__clientSecret=xxxxxxxxxxxxxxxxxxxxxxx
fc__microsoftOneDrive__enabled=true
fc__view__pageTitle=Fonto My Edition for Hello World
fc__view__topBarTitle=My Edition
fc__webdav__enabled=true

We recommend not storing the .env file in version control as it can contain secrets.

Set configuration keys for production

For production environments, the configuration keys that you have set in the .env file, have to be configured as environment variables. See the Deployment guides for examples on how to set these keys in several production (cloud-hosted) environments.