This folder contains the configuration files.
To avoid storing vulnerable data in the repository (such as tokens
and secrets) we have adopted the .env
approach to feed the vulnerable data to
different components of the microservice. It uses the 12-factor
principles.
This approach requires the python-dotenv
module (which is installed by running the pip install python-dotenv
command)
and an .env
file saved in this folder. One must create the .env
file by hand
since it is ignored in the project.
What follows is an example of the .env
file. To get the right configs contact
one of the developers contributing to this project.
The parameters that can be set in this file can be found here.
#######################################
### Production variables
#######################################
# session secret
PROD_SESSION_KEY=session-key
PROD_DATABASE_NAME={database-name}
PROD_DATABASE_USER={database-user}
PROD_DATABASE_PASSWORD={database-password}
#######################################
### Development variables
#######################################
# session secret
DEV_SESSION_KEY=session-key
DEV_DATABASE_NAME={database-name}
DEV_DATABASE_USER={database-user}
DEV_DATABASE_PASSWORD={database-password}
#######################################
### Test variables
#######################################
# session secret
TEST_SESSION_KEY=session-key
TEST_DATABASE_NAME={database-name}
TEST_DATABASE_USER={database-user}
TEST_DATABASE_PASSWORD={database-password}
######################################
# Common variables
######################################
# comma separated origins that will access the service
CORS_ORIGINS=origin1,origin2,origin3 (optional)