dockerize-celery-django-app icon indicating copy to clipboard operation
dockerize-celery-django-app copied to clipboard

environment variables

Open sri-vathsa opened this issue 5 years ago • 3 comments

Can you explain what this line does? env_file: *envfile

I tried using the code in my project and it gives an error

yaml.composer.ComposerError: found undefined alias 'envfile'

sri-vathsa avatar Nov 21 '19 14:11 sri-vathsa

These are yaml anchors, see: https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd

*envfile takes over the values that are defined above as &envfile

fzumstein avatar Nov 21 '19 14:11 fzumstein

Cool, got it. Even after using the same env file I am getting this error from celery.

Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.

Any idea why this is happening?

sri-vathsa avatar Nov 21 '19 15:11 sri-vathsa

@sri-vathsa: This is because CELERY_BROKER in the env.env file should read. CELERY_BROKER_URL.

lohedges avatar Aug 17 '20 12:08 lohedges