From 065becf277d1d56207114aeefbb25f85f62a678d Mon Sep 17 00:00:00 2001 From: Demetris Stavrou Date: Fri, 22 Jun 2018 17:32:10 +0300 Subject: [PATCH] Moved CELERY_BROKER_URL definition to .django env file to resolve error when Celery is not used (PR #1693) --- {{cookiecutter.project_slug}}/.envs/.production/.django | 7 +++++++ .../compose/production/django/entrypoint | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.envs/.production/.django b/{{cookiecutter.project_slug}}/.envs/.production/.django index 5cb90897..34ab71a2 100644 --- a/{{cookiecutter.project_slug}}/.envs/.production/.django +++ b/{{cookiecutter.project_slug}}/.envs/.production/.django @@ -43,3 +43,10 @@ SENTRY_DSN= # Redis # ------------------------------------------------------------------------------ REDIS_URL=redis://redis:6379/0 + +{% if cookiecutter.use_celery == "y" %} +# Celery +# ------------------------------------------------------------------------------ +CELERY_BROKER_URL=redis://redis:6379/0 + +{% endif %} \ No newline at end of file diff --git a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint index 4845e343..e2c22de5 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint +++ b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint @@ -5,9 +5,6 @@ set -o pipefail set -o nounset -# N.B. If only .env files supported variable expansion... -export CELERY_BROKER_URL="${REDIS_URL}" - if [ -z "${POSTGRES_USER}" ]; then base_postgres_image_default_user='postgres' export POSTGRES_USER="${base_postgres_image_default_user}"