-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variables in Django container not being properly set #70
Comments
I don't see how that line can be right: seems that it should really be something like: CELERY_BROKER_URL="${REDIS_URL}" |
Re the |
But it seemed to me that when running the local stack that the entrypoint script was not executing correctly as none of the environment variables set therein were actually set. |
If memory serves stuff of this ilk came up when trying to sort this: cookiecutter/cookiecutter-django#1888 so it may be possible to alter the configuration, perhaps in line with this change: cookiecutter/cookiecutter-django#2674 |
So, it looks like the environment variables set in the entrypoint script aren't being remembered because it's a different shell. I don't think it's the best idea to set environment variables in this way, see: Environment variables in Compose I'm not sure the Django container is actually running the The I believe that Docker Compose will only use the entrypoint/ENTRYPOINT script when using From Docker RUN vs CMD vs ENTRYPOINT:
|
By the way, passwords should probably not be stored in an environment variable. |
Proposed fix Joe-Heffer-Shef@9747be2 |
There's some problem with the environment variables file and the
entrypoint
script for thedjango
service, resulting in:CELERY_BROKER_URL
taking it's value from reprohack_site/.envs/.local/.django, due to the line:and not being set by
entrypoint
for some reason.similarly, this line is not being executed correctly, so
DATABASE_URL
is not set, meaning that a whole range of django db commands can't be run incl.createsuperuser
andmigrate
The text was updated successfully, but these errors were encountered: