From 823e383ae3195a3fbc573217710df538c69bdc30 Mon Sep 17 00:00:00 2001 From: Oleg Lavrovsky Date: Fri, 1 Jun 2018 11:15:34 +0200 Subject: [PATCH] sphc domain setup --- ansible/inventories/production/group_vars/webservers/vars.yaml | 2 ++ ansible/roles/web/templates/docker-compose.j2 | 2 +- ansible/roles/web/templates/ph-extra-nginx.conf.j2 | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ansible/inventories/production/group_vars/webservers/vars.yaml b/ansible/inventories/production/group_vars/webservers/vars.yaml index d48bc5a..e6edcf6 100644 --- a/ansible/inventories/production/group_vars/webservers/vars.yaml +++ b/ansible/inventories/production/group_vars/webservers/vars.yaml @@ -11,6 +11,8 @@ nginx_worker_connections: 1024 domain: "{{ vault_domain }}" +allowed_domains: "public-health.ch,www.public-health.ch,sphc.ch,www.sphc.ch" + django_email_key: "{{ vault_django_email_key }}" django_email_domain: "{{ vault_django_email_domain }}" django_email_from: "{{ vault_django_email_from }}" diff --git a/ansible/roles/web/templates/docker-compose.j2 b/ansible/roles/web/templates/docker-compose.j2 index 3357e7c..291c137 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 }},www.{{ domain }},{{ ipv4_addresses|join(':5000,') }} + - ALLOWED_HOSTS={{ allowed_domains }},{{ ipv4_addresses|join(':5000,') }} - SECRET_KEY={{ django_secret_key }} - MAILGUN_KEY={{ django_email_key }} - MAILGUN_DOMAIN={{ django_email_domain }} diff --git a/ansible/roles/web/templates/ph-extra-nginx.conf.j2 b/ansible/roles/web/templates/ph-extra-nginx.conf.j2 index a01d86f..36ccbdf 100644 --- a/ansible/roles/web/templates/ph-extra-nginx.conf.j2 +++ b/ansible/roles/web/templates/ph-extra-nginx.conf.j2 @@ -27,7 +27,7 @@ server { # Conference site server { listen 80; - server_name ph-gamma-kzql0g21.datalets.ch; + server_name sphc.ch www.sphc.ch; client_max_body_size 16M;