Moved CELERY_BROKER_URL definition to .django env file to resolve error when Celery is not used (PR #1693)

This commit is contained in:
Demetris Stavrou 2018-06-22 17:32:10 +03:00
parent 72893b1d06
commit 065becf277
2 changed files with 7 additions and 3 deletions

View File

@ -43,3 +43,10 @@ SENTRY_DSN=
# Redis # Redis
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
REDIS_URL=redis://redis:6379/0 REDIS_URL=redis://redis:6379/0
{% if cookiecutter.use_celery == "y" %}
# Celery
# ------------------------------------------------------------------------------
CELERY_BROKER_URL=redis://redis:6379/0
{% endif %}

View File

@ -5,9 +5,6 @@ set -o pipefail
set -o nounset set -o nounset
# N.B. If only .env files supported variable expansion...
export CELERY_BROKER_URL="${REDIS_URL}"
if [ -z "${POSTGRES_USER}" ]; then if [ -z "${POSTGRES_USER}" ]; then
base_postgres_image_default_user='postgres' base_postgres_image_default_user='postgres'
export POSTGRES_USER="${base_postgres_image_default_user}" export POSTGRES_USER="${base_postgres_image_default_user}"