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