Deployment config

This commit is contained in:
Oleg Lavrovsky 2017-05-10 18:08:35 +02:00
parent 7cb4e6fb92
commit 2e3f3722d0
3 changed files with 13 additions and 14 deletions

View file

@ -38,7 +38,7 @@ setup:
docker-compose exec web ./manage.py collectstatic
release:
docker-compose build web
sudo docker-compose build web
docker-compose stop web
docker-compose kill web
docker-compose up -d web

View file

@ -6,7 +6,7 @@ upstream wagtail-site {
server {
listen [::]:80;
listen 80;
server_name {{ domain }} www.{{ domain }};
server_name {{ domain }};
client_max_body_size 16M;
@ -48,28 +48,26 @@ server {
proxy_redirect off;
proxy_pass http://wagtail-site;
}
location /logicio/pmws/ {
return 301 /;
}
}
# Beta site configuration
server {
listen 80;
server_name beta.{{ domain }};
return 301 $scheme://{{ domain }};
}
# Web archive configuration
server {
listen 80;
server_name www-old.{{ domain }};
index index.html index.htm;
root {{ archive_dir }};
location / {
alias {{ release_dir }}/www-old/;
try_files $uri $uri/ =404;
}
}
# Beta site configuration
server {
listen 80;
server_name beta.{{ domain }} www.{{ domain }};
return 301 $scheme://{{ domain }};
}
# TODO: parameterize
server {
listen 80; listen 443 ssl;

View file

@ -3,6 +3,7 @@
gather_facts: True
vars:
release_dir: /opt/publichealth
archive_dir: /opt/www-old
django_log_dir: /var/log/publichealth
ipv4_addresses: "{{ ansible_all_ipv4_addresses }}"
environment: