-
Notifications
You must be signed in to change notification settings - Fork 0
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
34 changed files
with
84 additions
and
913 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
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 |
---|---|---|
|
@@ -29,6 +29,8 @@ | |
nodejs_version: "14.x" | ||
nodejs_npm_global_packages: | ||
- yarn | ||
tags: | ||
- nodejs | ||
|
||
- name: Create Yarn symbolic link | ||
file: | ||
|
@@ -37,6 +39,8 @@ | |
owner: "{{ nodejs_install_npm_user }}" | ||
group: "{{ nodejs_install_npm_user }}" | ||
state: link | ||
tags: | ||
- nodejs | ||
|
||
- name: Clone Master Gophie Web Repo. | ||
become: no | ||
|
@@ -45,13 +49,17 @@ | |
dest: "{{ gophie_web_path }}" | ||
repo: https://github.com/go-phie/gophie-web.git | ||
force: yes | ||
tags: | ||
- configuration | ||
|
||
- name: Build Code using Yarn. | ||
become: no | ||
shell: | ||
chdir: "{{ gophie_web_path }}" | ||
cmd: | | ||
/usr/bin/yarn | ||
tags: | ||
- configuration | ||
|
||
- name: Setup pm2 and start app. | ||
include_role: | ||
|
@@ -66,24 +74,42 @@ | |
NODE_ENV: production | ||
PORT: "{{ gophie_web_port }}" | ||
pm2_service_name: pm2-root | ||
tags: | ||
- pm2 | ||
- webserver | ||
|
||
- name: Install Certbot. | ||
include_role: | ||
name: geerlingguy.certbot | ||
vars: | ||
certbot_auto_renew_user: "ubuntu" | ||
certbot_auto_renew_options: "--quiet --no-self-upgrade --nginx" | ||
certbot_create_if_missing: true | ||
certbot_auto_renew_minute: "20" | ||
certbot_auto_renew_hour: "5" | ||
certbot_certs: | ||
- domains: | ||
- "{{ gophie_host }}" | ||
certbot_create_method: nginx | ||
- block: | ||
- name: Install nginx certbot package | ||
apt: | ||
state: present | ||
pkg: | ||
- python3-certbot-nginx | ||
|
||
- name: Install Certbot. | ||
include_role: | ||
name: geerlingguy.certbot | ||
apply: | ||
tags: | ||
- certbot | ||
vars: | ||
certbot_auto_renew_options: "--quiet --no-self-upgrade --nginx" | ||
certbot_admin_email: [email protected] | ||
certbot_auto_renew_user: root | ||
certbot_create_if_missing: true | ||
certbot_certs: | ||
- domains: | ||
- "{{ gophie_host }}" | ||
certbot_create_method: nginx | ||
tags: | ||
- certbot | ||
become: yes | ||
|
||
- name: Install Nginx. | ||
include_role: | ||
name: geerlingguy.nginx | ||
tags: | ||
- nginx | ||
- webserver | ||
vars: | ||
nginx_vhosts: | ||
- listen: "443 ssl http2" | ||
|
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 |
---|---|---|
|
@@ -80,10 +80,12 @@ | |
job: "sudo {{ mythra_path }} clear-cache >> /tmp/mythra-cache-clear.log 2>&1" | ||
user: "gcp" | ||
|
||
roles: | ||
- name: geerlingguy.nginx | ||
- name: Install Nginx. | ||
include_role: | ||
name: geerlingguy.nginx | ||
tags: nginx | ||
vars: | ||
nginx_service_state: stopped | ||
nginx_vhosts: | ||
- listen: "443 ssl http2" | ||
server_name: "mythra.gophie.cam" | ||
|
@@ -113,19 +115,29 @@ | |
return: "301 https://mythra.gophie.cam$request_uri" | ||
filename: "mythra.cam.80.conf" | ||
|
||
- name: certbot | ||
- name: Certbot | ||
tags: certbot | ||
vars: | ||
certbot_auto_renew_user: "gcp" | ||
certbot_auto_renew_options: "--quiet --no-self-upgrade --nginx" | ||
certbot_admin_email: [email protected] | ||
certbot_create_if_missing: true | ||
certbot_auto_renew_minute: "20" | ||
certbot_auto_renew_hour: "5" | ||
certbot_certs: | ||
- domains: | ||
- mythra.gophie.cam | ||
certbot_create_method: nginx | ||
block: | ||
- name: Install nginx certbot package | ||
apt: | ||
state: present | ||
pkg: | ||
- python3-certbot-nginx | ||
- include_role: | ||
name: geerlingguy.certbot | ||
apply: | ||
tags: | ||
- certbot | ||
vars: | ||
certbot_auto_renew_user: "root" | ||
certbot_auto_renew_options: "--quiet --no-self-upgrade --nginx" | ||
certbot_admin_email: [email protected] | ||
certbot_create_if_missing: true | ||
certbot_certs: | ||
- domains: | ||
- mythra.gophie.cam | ||
notify: | ||
- Restart nginx | ||
|
||
handlers: | ||
- name: Start mythra | ||
|
@@ -144,3 +156,8 @@ | |
state: started | ||
name: chromedriver | ||
daemon_reload: yes | ||
|
||
- name: Restart nginx | ||
systemd: | ||
state: started | ||
name: nginx |
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,2 @@ | ||
ansible==5.4.0 | ||
ansible-core==2.12.2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.