Deployment config
This commit is contained in:
parent
7cb4e6fb92
commit
2e3f3722d0
3 changed files with 13 additions and 14 deletions
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue