diff --git a/playbooks/beta/base-site-conf/freechat.shockrah.xyz b/playbooks/beta/base-site-conf/freechat.shockrah.xyz new file mode 100644 index 0000000..425c172 --- /dev/null +++ b/playbooks/beta/base-site-conf/freechat.shockrah.xyz @@ -0,0 +1,13 @@ +# This file basically contains the base configuration for freechat.shockrah.xyz +# This is to be installed before running certbot against it as this only sets us +# up for correct HTTP(not TLS) based connections + +server { + root /var/www/freechat; + index index.html; + server_name athens-freechat.shockrah.xyz; + + location / { + try_files $uri $uri/ =404; + } +} diff --git a/playbooks/beta/base-site-conf/shockrah.xyz b/playbooks/beta/base-site-conf/shockrah.xyz new file mode 100644 index 0000000..9836ab4 --- /dev/null +++ b/playbooks/beta/base-site-conf/shockrah.xyz @@ -0,0 +1,14 @@ +# This file basically contains the base configuration for freechat.shockrah.xyz +# This is to be installed before running certbot against it as this only sets us +# up for correct HTTP(not TLS) based connections + +server { + root /var/www/shockrah.xyz; + index index.html; + server_name shockrah.xyz; + + location / { + try_files $uri $uri/ =404; + } +} + diff --git a/playbooks/beta/local-freechat-push.yml b/playbooks/beta/local-freechat-push.yml new file mode 100644 index 0000000..616565d --- /dev/null +++ b/playbooks/beta/local-freechat-push.yml @@ -0,0 +1,20 @@ +# This will take care of pushing out +--- +- hosts: web + remote_user: web + tasks: + - name: Clean out remote remote site content + file: + path: /var/www/freechat + state: absent + + - name: Push /public directory to /var/www/freechat + copy: + src: "{{FC_LOCAL_DOCS}}/public" + dest: /var/www/ + + - name: Pull up public directory + command: mv /var/www/public /var/www/freechat + + + diff --git a/playbooks/beta/setup-nginx-confs.yml b/playbooks/beta/setup-nginx-confs.yml new file mode 100644 index 0000000..2d47525 --- /dev/null +++ b/playbooks/beta/setup-nginx-confs.yml @@ -0,0 +1,25 @@ +--- +- hosts: beta + remote_user: ubuntu + become: yes + become_method: sudo + tasks: + - name: Push into sites-available + copy: + src: "{{item}}" + dest: /etc/nginx/sites-available/ + loop: + - base-site-conf/freechat.shockrah.xyz + + - name: Enable Freechat Docs site in Nginx + file: + src: /etc/nginx/sites-available/freechat.shockrah.xyz + dest: /etc/nginx/sites-enabled/freechat.shockrah.xyz + state: link + - name: Restart Nginx service + service: + name: nginx + state: restarted + + +