Skip to content

Conversation

@rragundez
Copy link
Contributor

@rragundez rragundez commented Nov 19, 2025

IMPORTANT: PR #222 has to be merged first.

At the moment there is a mixture of getting settings from environment variables and from an .env file. This is confusing and can lead to cumbersome bugs. This PR addresses the problem only for the local deployment (prod and staging will come later) where it makes it clear that settings will only be taken from the .env file (via environment variables) and removes the setting of environment variables to the runtime via the docker compose definition.
While doing that then it is also possible to enable reloading of the application based on changes to the .env file, which is quite useful for development. At the moment the app only reload when py files change.
It also removed the command in the docker compose definition and simplifies the responsibility of running the command by giving it solely to the Dockerfile (at the moment it seems to be and be promoted via the comments to change the command in either dockerfile or docker compose which is confusing for a user).

@igorbenav
Copy link
Collaborator

@LucasQR

@igorbenav igorbenav requested a review from LucasQR November 19, 2025 17:39
@rragundez rragundez changed the title [WIP] Reload settings on .env file change for local deployment [WIP] Reload app settings on .env file change for local deployment Nov 19, 2025
Copy link
Collaborator

@LucasQR LucasQR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm testing this pr, and you said "While doing that then it is also possible to enable reloading of the application based on changes to the .env file, which is quite useful for development" but it doesn't seem to happen. I tried changing the ADMIN_PASSWORD on .env with the app running and then login as the admin with the new password.
It says the new admin tables are being created, says the app reloaded but the password doesn't actually change

Screenshot 2025-11-19 at 16 58 38

@rragundez rragundez reopened this Nov 20, 2025
@rragundez rragundez changed the title [WIP] Reload app settings on .env file change for local deployment Reload app settings on .env file change for local deployment Nov 20, 2025
@rragundez
Copy link
Contributor Author

rragundez commented Nov 20, 2025

@LucasQR thanks so much for checking, perhaps you forgot to add --build to the docker compose command? there is a change in the Dockerfile to watch the .env file so it needs to be rebuilt.

BTW because the commits were squashed from the other PR I had to force pushed, apologies but you will need to force pull. Hope not too much trouble.

let me know if you still see it not reloading on .env changes. Thanks again.

@rragundez
Copy link
Contributor Author

Hi @LucasQR can you have another look? Check my comment above, maybe that was the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants