mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 13:14:28 +03:00
fixed redis url on docker
This commit is contained in:
parent
32a61e8678
commit
f8a610502a
|
@ -2,6 +2,10 @@
|
||||||
All enhancements and patches to cookiecutter-django will be documented in this file.
|
All enhancements and patches to cookiecutter-django will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## [2015-1-8]
|
||||||
|
### Changed
|
||||||
|
- Fixed redis url on docker (@jayfk)
|
||||||
|
|
||||||
## [2015-1-6]
|
## [2015-1-6]
|
||||||
### Added
|
### Added
|
||||||
- You can now enable or disable user registration using the ACCOUNT_ALLOW_REGISTRATION setting. (@ddiazpinto)
|
- You can now enable or disable user registration using the ACCOUNT_ALLOW_REGISTRATION setting. (@ddiazpinto)
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
# Since docker-compose relies heavily on environment variables itself for configuration, we'd have to define multiple
|
# Since docker-compose relies heavily on environment variables itself for configuration, we'd have to define multiple
|
||||||
# environment variables just to support cookiecutter out of the box. That makes no sense, so this little entrypoint
|
# environment variables just to support cookiecutter out of the box. That makes no sense, so this little entrypoint
|
||||||
# does all this for us.
|
# does all this for us.
|
||||||
export REDIS_URL=redis://redis:6379/0
|
export REDIS_URL=redis://redis:6379
|
||||||
|
|
||||||
# the official postgres image uses 'postgres' as default user if not set explictly.
|
# the official postgres image uses 'postgres' as default user if not set explictly.
|
||||||
if [ -z "$POSTGRES_ENV_POSTGRES_USER" ]; then
|
if [ -z "$POSTGRES_ENV_POSTGRES_USER" ]; then
|
||||||
|
@ -13,6 +13,6 @@ fi
|
||||||
|
|
||||||
export DATABASE_URL=postgres://$POSTGRES_ENV_POSTGRES_USER:$POSTGRES_ENV_POSTGRES_PASSWORD@postgres:5432/$POSTGRES_ENV_POSTGRES_USER
|
export DATABASE_URL=postgres://$POSTGRES_ENV_POSTGRES_USER:$POSTGRES_ENV_POSTGRES_PASSWORD@postgres:5432/$POSTGRES_ENV_POSTGRES_USER
|
||||||
{% if cookiecutter.use_celery == 'y' %}
|
{% if cookiecutter.use_celery == 'y' %}
|
||||||
export CELERY_BROKER_URL=$REDIS_URL
|
export CELERY_BROKER_URL=$REDIS_URL/0
|
||||||
{% endif %}
|
{% endif %}
|
||||||
exec "$@"
|
exec "$@"
|
|
@ -170,7 +170,7 @@ DATABASES['default'] = env.db("DATABASE_URL")
|
||||||
CACHES = {
|
CACHES = {
|
||||||
"default": {
|
"default": {
|
||||||
"BACKEND": "django_redis.cache.RedisCache",
|
"BACKEND": "django_redis.cache.RedisCache",
|
||||||
"LOCATION": "{0}/{1}".format(env.cache_url('REDIS_URL', default="redis://127.0.0.1:6379"), 0),
|
"LOCATION": "{0}/{1}".format(env('REDIS_URL', default="redis://127.0.0.1:6379"), 0),
|
||||||
"OPTIONS": {
|
"OPTIONS": {
|
||||||
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
||||||
"IGNORE_EXCEPTIONS": True, # mimics memcache behavior.
|
"IGNORE_EXCEPTIONS": True, # mimics memcache behavior.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user