Forum Discussion
Azure App Service (Windows) Config Variable
Hi akhilvatts how do you suggest to work with Application Settings on local dev environments? Using .evn.local, .env.qa and .env.prd allows me to have specific environment variables managed through my codebase. I use the pipeline to convert .env.<environment> to .env and then inject sensitive values against keys such as password from a vault.
Managing environment variables through Application Settings means more overhead whenever I need to introduce new variables, especially non-sensitive ones.
It seems like this was a specific problem with my Python Flask application. Since Azure App Service uses gunicorn to start Python applications and not the Flask CLI, the .env file was not getting loaded into the project because the Flask CLI will typically load the python-dotenv package. Once I loaded it myself into main.py, it started working again.