forked from 3wordchant/capsul-flask
24 lines
650 B
Markdown
24 lines
650 B
Markdown
|
# Configuring Capsul-Flask
|
|||
|
|
|||
|
Create a `.env` file to set up the application configuration:
|
|||
|
|
|||
|
```
|
|||
|
nano .env
|
|||
|
```
|
|||
|
|
|||
|
You can enter any environment variables referenced in `__init__.py` to this file.
|
|||
|
|
|||
|
For example you may enter your SMTP credentials like this:
|
|||
|
```
|
|||
|
MAIL_USERNAME=forest@nullhex.com
|
|||
|
MAIL_DEFAULT_SENDER=forest@nullhex.com
|
|||
|
MAIL_PASSWORD=**************
|
|||
|
```
|
|||
|
|
|||
|
## Loading variables from files
|
|||
|
|
|||
|
To support [Docker Secrets](https://docs.docker.com/engine/swarm/secrets/), you can also load secret values from files – for example, to load `MAIL_PASSWORD` from `/run/secrets/mail_password`, set
|
|||
|
```sh
|
|||
|
MAIL_PASSWORD_FILE=/run/secrets/mail_password
|
|||
|
```
|