# Configuration Most of the configuration takes place over environment variables. These can be passed to applications in so many ways, it's worth expanding a little on that below. **Note**, the PostgreSQL related variables are named the same as in Kartoza's excellent [PostGIS image](https://github.com/kartoza/docker-postgis) which we highly recommend. ## Places to look for configuration Flask applications are most often configured globally by a root `config.py` file. Configuration parameters are usually taken from environment variables, but also have sensible defaults in `config.py`. #### `.flaskenv` This is only relevant for Flask and points only to the app module. #### `.env` As many frameworks, Flask supports the `dotenv` strategy, i.e. placing all variables in a root `.env` file, which is automatically read on app startup and used to configure the project. Normally those files are excluded from version control. We decided to include one in this project. **Note**, also `docker-compose` reads `.env` files by default so one can use it to parameterize the `docker-compose.yml` file (but **not to pass environment variables to containers**). #### `.docker_env` It's a similar concept as `.env` only that there's no auto-magic happening and needs to be explicitly passed. The `.docker_env` file is targeted at the `docker-compose` approach and should be used to configure the project when using the [docker installation](https://github.com/gis-ops/routing-graph-packager/wiki/Installation#docker-installation). The main reason for its existence is that the database hosts need to be named like the docker service names. ## Variables ### Important notes There are some inter-dependencies in the setup of the configuration variables: **`DATA_DIR`**: This directory will be used to - store the PBF files in the `osm`, `tomtom`, `here` subdirectories - store the graph packages in subdirectories (named after the routing engine) - store temporary files create while generating the graphs (and mostly be removed by the end of a _successful_ operation) **`ENABLED_ROUTERS`**: All routing engine names specified here are expected to have the corresponding docker image on the host, which you can tweak with the `_/`. Default `redis://localhost:6379/0`. | | **SMTP** | | | | `SMTP_HOST` | str | The host name for the SMTP server, e.g. `smtp.gmail.com`. Default `localhost`. | | `SMTP_PORT` | int | The port for the SMTP server. Default `1025`. | | `SMTP_USER` | str | The user name for the email account. If omitted, no authentication will be attempted. | | `SMTP_PASS` | str | The password for the email account. If omitted, no authentication will be attempted. | | `SMTP_SECURE` | bool | Whether TLS should be used to secure the email communication, `True` or `False` Default `False`. | |