drachenwald / dw_op

1 stars 5 forks source link

Add DW_OP_-prefixed env vars available for database #75

Closed olleolleolle closed 4 months ago

olleolleolle commented 7 months ago

This PR is a "developer-experience" improvement. In order to be able to choose what password etc is used for the MySQL database, the config.py file reads those values from environment variables rather than fixing them to a value.

This allows for having more-secure passwords for databases that have that requirement, such as they have if they ran the secure setup script that comes with a Homebrew-installed MySQL.

If absent, the values fall back to the ones already in place.

In order to document the presence of these env vars, I changed the docker-compose.yml's used environment variables.

I tried to set a wrong database, and got a good 500 error in the development mode of the website.

To add more environment variables, we can re-use this prefix. Perhaps it becomes easy enough to search the codebase for it, to find and document.