-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
= Ansible deployment of the static site | ||
|
||
This folder contains deployment playbook. It is presumed that target uses nginx and systemd. | ||
|
||
. Build the static site (see ../build folder) | ||
. Invoke `ansible-playbook -i hosts deploy.yml -e content_zip_file=../build/schemeindex.zip` from this directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
- name: 'Deploy scheme index' | ||
hosts: index.scheme.org | ||
tasks: | ||
- name: 'Upload nginx config' | ||
template: | ||
src: 'template/scheme_index.conf' | ||
dest: '{{nginx_conf_d_location}}/scheme_index.conf' | ||
- name: 'Ensure content root exists' | ||
file: | ||
name: '{{root_location}}' | ||
state: 'directory' | ||
- name: 'Upload scheme index content' | ||
unarchive: | ||
src: '{{content_zip_file}}' | ||
dest: '{{root_location}}' | ||
- name: 'Reload nginx service' | ||
systemd_service: | ||
name: 'nginx' | ||
state: 'reloaded' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
all: | ||
hosts: | ||
index.scheme.org: | ||
ansible_user: root | ||
certs_location: /etc/letsencrypt/live/index.scheme.org/ | ||
nginx_conf_d_location: /etc/nginx/conf.d | ||
root_location: /var/www/scheme_index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
server { | ||
|
||
listen 1443 ssl; | ||
server_name index.scheme.org; | ||
ssl_certificate {{certs_location}}/fullchain.pem; | ||
ssl_certificate_key {{certs_location}}/privkey.pem; | ||
|
||
root {{root_location}}; | ||
index index.html; | ||
|
||
location / { | ||
try_files $uri index.html; | ||
} | ||
|
||
} |