mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-25 19:14:03 +03:00
parent
ae9dc2e782
commit
26ccf9307f
|
@ -1,8 +1,7 @@
|
|||
# General
|
||||
# ------------------------------------------------------------------------------
|
||||
USE_DOCKER=yes
|
||||
{% if cookiecutter.use_celery == "y" %}
|
||||
# Celery
|
||||
|
||||
# Redis
|
||||
# ------------------------------------------------------------------------------
|
||||
CELERY_BROKER_URL=redis://redis:6379/0
|
||||
{% endif %}
|
||||
REDIS_URL=redis://redis:6379/0
|
||||
|
|
|
@ -16,11 +16,7 @@ DJANGO_SECURE_SSL_REDIRECT=False
|
|||
MAILGUN_API_KEY=
|
||||
DJANGO_SERVER_EMAIL=
|
||||
MAILGUN_DOMAIN=
|
||||
{% if cookiecutter.use_celery == "y" %}
|
||||
# Celery
|
||||
# ------------------------------------------------------------------------------
|
||||
CELERY_BROKER_URL=redis://redis:6379/0
|
||||
{% endif %}
|
||||
|
||||
# AWS
|
||||
# ------------------------------------------------------------------------------
|
||||
DJANGO_AWS_ACCESS_KEY_ID=
|
||||
|
@ -43,3 +39,7 @@ WEB_CONCURRENCY=4
|
|||
# ------------------------------------------------------------------------------
|
||||
DJANGO_SENTRY_DSN=
|
||||
{% endif %}
|
||||
|
||||
# Redis
|
||||
# ------------------------------------------------------------------------------
|
||||
REDIS_URL=redis://redis:6379/0
|
||||
|
|
|
@ -7,6 +7,9 @@ set -o nounset
|
|||
|
||||
cmd="$@"
|
||||
|
||||
# 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}"
|
||||
|
|
|
@ -21,7 +21,7 @@ DATABASES['default']['CONN_MAX_AGE'] = env.int('CONN_MAX_AGE', default=60) # no
|
|||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django_redis.cache.RedisCache',
|
||||
'LOCATION': f'{env("REDIS_URL", default="redis://127.0.0.1:6379")}/{0}',
|
||||
'LOCATION': env('REDIS_URL'),
|
||||
'OPTIONS': {
|
||||
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
|
||||
# Mimicing memcache behavior.
|
||||
|
|
Loading…
Reference in New Issue
Block a user