diff --git a/Makefile b/Makefile index 06c7099..c848c6d 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ setup: release: docker-compose pull - sudo docker-compose build web --verbose + sudo docker-compose build web docker-compose stop web docker-compose kill web docker-compose up -d web diff --git a/ansible/roles/web/templates/docker-compose.j2 b/ansible/roles/web/templates/docker-compose.j2 index 3b508a7..bb123ea 100644 --- a/ansible/roles/web/templates/docker-compose.j2 +++ b/ansible/roles/web/templates/docker-compose.j2 @@ -35,6 +35,8 @@ postgres: ports: - "5432:5432" elasticsearch: - image: elasticsearch:2 + image: elasticsearch:5 ports: - "9200:9200" + environment: + - ES_JAVA_OPTS="-Xms512m -Xmx512m" diff --git a/publichealth/settings/production.py b/publichealth/settings/production.py index c2f6f0a..78f27dc 100644 --- a/publichealth/settings/production.py +++ b/publichealth/settings/production.py @@ -131,7 +131,7 @@ if REDIS_LOCATION is not None: if 'ELASTICSEARCH_URL' in env: WAGTAILSEARCH_BACKENDS = { 'default': { - 'BACKEND': 'wagtail.search.backends.elasticsearch2', + 'BACKEND': 'wagtail.search.backends.elasticsearch5', 'URLS': [env['ELASTICSEARCH_URL']], 'INDEX': APP_NAME, 'ATOMIC_REBUILD': True,