diff --git a/CHANGELOG.md b/CHANGELOG.md index e7dec781..506b7cb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All enhancements and patches to cookiecutter-django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2015-1-8] +### Changed +- Fixed redis url on docker (@jayfk) +- Fixed docker on windows (@burhan) + ## [2015-1-6] ### Added - You can now enable or disable user registration using the ACCOUNT_ALLOW_REGISTRATION setting. (@ddiazpinto) diff --git a/{{cookiecutter.repo_name}}/compose/django/entrypoint.sh b/{{cookiecutter.repo_name}}/compose/django/entrypoint.sh index ffae9009..d7a34f03 100644 --- a/{{cookiecutter.repo_name}}/compose/django/entrypoint.sh +++ b/{{cookiecutter.repo_name}}/compose/django/entrypoint.sh @@ -4,7 +4,7 @@ set -e # 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 # 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. 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 {% if cookiecutter.use_celery == 'y' %} -export CELERY_BROKER_URL=$REDIS_URL +export CELERY_BROKER_URL=$REDIS_URL/0 {% endif %} -exec "$@" \ No newline at end of file +exec "$@" diff --git a/{{cookiecutter.repo_name}}/config/settings/production.py b/{{cookiecutter.repo_name}}/config/settings/production.py index be16818a..09b7ba37 100644 --- a/{{cookiecutter.repo_name}}/config/settings/production.py +++ b/{{cookiecutter.repo_name}}/config/settings/production.py @@ -170,7 +170,7 @@ DATABASES['default'] = env.db("DATABASE_URL") CACHES = { "default": { "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": { "CLIENT_CLASS": "django_redis.client.DefaultClient", "IGNORE_EXCEPTIONS": True, # mimics memcache behavior.