From 3d10288d6d90f652ad64315a076b4dacb8043aaa Mon Sep 17 00:00:00 2001 From: Salt Date: Thu, 25 Mar 2021 12:59:40 -0500 Subject: [PATCH] Deploy 9iron container to production --- playbooks/vars/desultd-apache.yml | 6 +++--- playbooks/web.yml | 23 ++++++++++++++++------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/playbooks/vars/desultd-apache.yml b/playbooks/vars/desultd-apache.yml index f86ee66..84e4102 100644 --- a/playbooks/vars/desultd-apache.yml +++ b/playbooks/vars/desultd-apache.yml @@ -61,9 +61,9 @@ apache_vhosts_ssl: certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem - servername: www.9iron.club extra_parameters: | - - Options Indexes FollowSymLinks - + ProxyPreserveHost On + ProxyRequests Off + ProxyPass / http://127.0.0.1:8001/ nocanon retry=1 documentroot: /var/www/www.9iron.club certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem diff --git a/playbooks/web.yml b/playbooks/web.yml index 8140944..ce1dec4 100755 --- a/playbooks/web.yml +++ b/playbooks/web.yml @@ -3,10 +3,6 @@ # Webservers --- - hosts: web1.desu.ltd - tasks: - - name: configure nextcloud cronjob - cron: user=www-data name=nextcloud minute=*/5 job="php -f /var/www/nc.desu.ltd/cron.php" - tags: [ nextcloud, cron ] vars_files: - vars/apache.yml - vars/php-fpm.yml @@ -14,6 +10,22 @@ - vars/desultd-certbot.yml - vars/desultd-gitea.yml - vars/desultd-nextcloud.yml + tasks: + - name: configure nextcloud cronjob + cron: user=www-data name=nextcloud minute=*/5 job="php -f /var/www/nc.desu.ltd/cron.php" + tags: [ nextcloud, cron ] + - name: docker deploy 9iron + docker_container: + name: 9iron + state: started + image: rehashedsalt/9iron:latest + restart_policy: unless-stopped + pull: yes + ports: + - 8001:80 + volumes: + - /data/9iron/files:/var/www/html/files + tags: [ docker, 9iron ] roles: - role: backup vars: @@ -21,7 +33,6 @@ - /data - /var/lib/gitea - /var/www/nc.desu.ltd - - /var/www/www.9iron.club/files - /srv/desu.ltd backup_s3backup_exclude_list_extra: - /var/lib/gitea/log @@ -47,8 +58,6 @@ git_repos: - repo: https://git.desu.ltd/salt/desultd dest: /var/www/desu.ltd - - repo: https://git.desu.ltd/salt/9iron - dest: /var/www/www.9iron.club - repo: https://git.9iron.club/KidiroInfiniti/OTW_Site dest: /var/www/www.otwstudios.org - repo: https://git.desu.ltd/salt/gitea-custom