diff --git a/ansible/roles/web/templates/docker-compose.j2 b/ansible/roles/web/templates/docker-compose.j2 index b47c336..1552410 100644 --- a/ansible/roles/web/templates/docker-compose.j2 +++ b/ansible/roles/web/templates/docker-compose.j2 @@ -13,7 +13,7 @@ web: - "5000:5000" environment: - DJANGO_SETTINGS_MODULE={{ django_project_name }}.settings.production - - ALLOWED_HOSTS={{ domain }},{{ ipv4_addresses|join(':5000,') }} + - ALLOWED_HOSTS={{ domain }},www.{{ domain }},{{ ipv4_addresses|join(':5000,') }} - SECRET_KEY={{ django_secret_key }} - MAILGUN_KEY={{ django_email_key }} - MAILGUN_DOMAIN={{ django_email_domain }} diff --git a/publichealth/settings/production.py b/publichealth/settings/production.py index 5d06f81..eb23ad7 100644 --- a/publichealth/settings/production.py +++ b/publichealth/settings/production.py @@ -97,19 +97,6 @@ if 'MAILGUN_KEY' in os.environ: } DEFAULT_FROM_EMAIL = env['MAILGUN_FROM'] -# Use Redis as the cache backend for extra performance - -CACHES = { - 'default': { - 'BACKEND': 'django_redis.cache.RedisCache', - 'LOCATION': '127.0.0.1:6379', - 'KEY_PREFIX': 'publichealth', - 'OPTIONS': { - 'CLIENT_CLASS': 'django_redis.client.DefaultClient', - } - } -} - # Redis location can either be passed through with REDIS_HOST or REDIS_SOCKET if 'REDIS_URL' in env: @@ -127,7 +114,6 @@ elif 'REDIS_SOCKET' in env: else: REDIS_LOCATION = None - if REDIS_LOCATION is not None: CACHES = { 'default': {