Merge pull request #1956 from pydanny/conditional-redis-merge

## Description

This is the same as the pull request #1693 with the master branch merged into it to avoid all the extra unrelated commits which are already in master. Looks like Github is getting confused due to a rebase on that branch, which make that PR hard to review...

## Rationale

See #1693 - Locally, Redis is necessary only if Celery is used, while in Production it's also used for Caching.

## Use case(s) / visualization(s)

Fixes #1691
This commit is contained in:
Bruno Alla 2019-03-11 21:12:58 +00:00 committed by GitHub
commit 9eab0b9365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -3,10 +3,11 @@
USE_DOCKER=yes
IPYTHONDIR=/app/.ipython
{%- if cookiecutter.use_celery == 'y' %}
# Redis
# ------------------------------------------------------------------------------
REDIS_URL=redis://redis:6379/0
{% if cookiecutter.use_celery == 'y' %}
# Celery
# ------------------------------------------------------------------------------

View File

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