Skip to content
Snippets Groups Projects
Commit ec4379f8 authored by James Graham's avatar James Graham
Browse files

Merge nginx config

parent 188603f5
Branches
Tags
No related merge requests found
server { server {
listen 80; listen 80;
server_name localhost pedasi.* pedasi-dev.* *.iotobservatory.io; server_name _;
merge_slashes off; merge_slashes off;
......
server {
listen 80;
merge_slashes off;
location = /favicon.ico {
alias /var/www/pedasi/static/img/favicon.ico;
}
location /static/ {
alias /var/www/pedasi/static/;
}
location = /report.html {
alias /var/www/pedasi/report.html;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
}
location = /robots.txt {
alias /var/www/pedasi/deploy/robots.txt;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/pedasi.sock;
}
}
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
- name: Copy settings - name: Copy settings
copy: copy:
src: '{{ env_file | default("deploy/.env.dev") }}' src: '{{ env_file | default("deploy/.env") }}'
dest: '{{ project_dir }}/.env' dest: '{{ project_dir }}/.env'
owner: www-data owner: www-data
group: www-data group: www-data
...@@ -155,23 +155,13 @@ ...@@ -155,23 +155,13 @@
- { src: '{{ project_dir }}/deploy/uwsgi/sites/pedasi.ini', dest: /etc/uwsgi/sites/pedasi.ini } - { src: '{{ project_dir }}/deploy/uwsgi/sites/pedasi.ini', dest: /etc/uwsgi/sites/pedasi.ini }
- { src: '{{ project_dir }}/deploy/systemd/system/uwsgi.service', dest: /etc/systemd/system/uwsgi.service } - { src: '{{ project_dir }}/deploy/systemd/system/uwsgi.service', dest: /etc/systemd/system/uwsgi.service }
- name: Copy web config files - dev - name: Copy web config files
copy:
src: '{{ project_dir }}/deploy/nginx/sites-available/pedasi.dev'
dest: /etc/nginx/sites-available/pedasi
remote_src: yes
# WARNING: this will not update an existing file
force: no
when: production is not defined
- name: Copy web config files - production
copy: copy:
src: '{{ project_dir }}/deploy/nginx/sites-available/pedasi' src: '{{ project_dir }}/deploy/nginx/sites-available/pedasi'
dest: /etc/nginx/sites-available/pedasi dest: /etc/nginx/sites-available/pedasi
remote_src: yes remote_src: yes
# WARNING: this will not update an existing file # WARNING: this will not update an existing file
force: no force: no
when: production is defined
- name: Activate Nginx site - name: Activate Nginx site
file: file:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment