From 4d045744ff75f8dcc6448f60141ca67405687b10 Mon Sep 17 00:00:00 2001 From: josiah Date: Thu, 30 May 2024 17:54:03 -0500 Subject: [PATCH] Deploy chat to mattermost in awful.club. --- ansible/_deploy_testchat.yml | 6 +++--- ansible/inventory/hosts.yml | 6 +++--- ansible/roles/mattermost/tasks/main.yml | 6 +++--- ansible/roles/mattermost/templates/env.j2 | 4 ++-- terraform/do_domains/records_awful.club.tf | 12 ++++++++++++ terraform/do_domains/records_home.jowj.net.tf | 13 +------------ 6 files changed, 24 insertions(+), 23 deletions(-) diff --git a/ansible/_deploy_testchat.yml b/ansible/_deploy_testchat.yml index 7e5b3b4..e0a1966 100644 --- a/ansible/_deploy_testchat.yml +++ b/ansible/_deploy_testchat.yml @@ -1,9 +1,9 @@ - name: deploy mattermost - hosts: testchat01 + hosts: mattermost-trial remote_user: "{{ remote_user }}" tasks: - debug: msg="Deploying mediaserver stack to local server" roles: -# - { name: debian_base } - - { name: tailscale } + # - { name: debian_base } + # - { name: tailscale } - { name: mattermost } diff --git a/ansible/inventory/hosts.yml b/ansible/inventory/hosts.yml index 2b6f5fe..a3e04c4 100644 --- a/ansible/inventory/hosts.yml +++ b/ansible/inventory/hosts.yml @@ -25,10 +25,10 @@ all: ansible_user: alice testchat: hosts: - testchat01: - ansible_host: 192.168.1.224 + mattermost-trial: + ansible_host: 104.248.79.77 ansible_python_interpreter: /usr/bin/python3 - ansible_user: alice + ansible_user: root services: hosts: lair: diff --git a/ansible/roles/mattermost/tasks/main.yml b/ansible/roles/mattermost/tasks/main.yml index 39ed787..18680ad 100644 --- a/ansible/roles/mattermost/tasks/main.yml +++ b/ansible/roles/mattermost/tasks/main.yml @@ -28,7 +28,7 @@ mode: 0700 recurse: yes with_items: - [ '/home/josiah/volumes/app/mattermost/config', '/home/josiah/volumes/app/mattermost/data', '/home/josiah/volumes/app/mattermost/logs', '/home/josiah/volumes/app/mattermost/plugins', '/home/josiah/volumes/app/mattermost/client/plugins', '/home/josiah/volumes/app/mattermost/bleve-indexes' ] + [ '/home/josiah/mattermost/volumes/app/mattermost/config', '/home/josiah/mattermost/volumes/app/mattermost/data', '/home/josiah/mattermost/volumes/app/mattermost/logs', '/home/josiah/mattermost/volumes/app/mattermost/plugins', '/home/josiah/mattermost/volumes/app/mattermost/client/plugins', '/home/josiah/mattermost/volumes/app/mattermost/bleve-indexes' ] - name: Deploy mattermost with compose docker_compose: @@ -36,5 +36,5 @@ project_name: mm files: - docker-compose.yml - - docker-compose.without-nginx.yml - #- docker-compose.nginx.yml \ No newline at end of file + # - docker-compose.without-nginx.yml + - docker-compose.nginx.yml \ No newline at end of file diff --git a/ansible/roles/mattermost/templates/env.j2 b/ansible/roles/mattermost/templates/env.j2 index 9ea3f60..7d1fde9 100644 --- a/ansible/roles/mattermost/templates/env.j2 +++ b/ansible/roles/mattermost/templates/env.j2 @@ -1,5 +1,5 @@ # Domain of service -DOMAIN=mattermost.home.jowj.net +DOMAIN=mattermost.awful.club # Container settings ## Timezone inside the containers. The value needs to be in the form 'Europe/Berlin'. @@ -22,7 +22,7 @@ POSTGRES_PASSWORD= {{ vault_mm_POSTGRES_PASSWORD }} POSTGRES_DB={{ vault_mm_POSTGRES_DB }} # Nginx -## The nginx container will use a configuration found at the NGINX_MATTERMOST_CONFIG. The config aims +## The nginx container will use a configuration found at the NGINX_MATTERMOST_CONFIG. The config aims ## to be secure and uses a catch-all server vhost which will work out-of-the-box. For additional settings ## or changes ones can edit it or provide another config. Important note: inside the container, nginx sources ## every config file inside */etc/nginx/conf.d* ending with a *.conf* file extension. diff --git a/terraform/do_domains/records_awful.club.tf b/terraform/do_domains/records_awful.club.tf index f7c7bcf..f05f78c 100755 --- a/terraform/do_domains/records_awful.club.tf +++ b/terraform/do_domains/records_awful.club.tf @@ -406,3 +406,15 @@ resource "digitalocean_record" "tfer--98495666" { value = "134.209.53.112" weight = "0" } + +resource "digitalocean_record" mattermost-dns { + domain = "awful.club" + flags = "0" + name = "mattermost" + port = "0" + priority = "0" + ttl = "900" + type = "A" + value = "104.248.79.77" + weight = "0" +} \ No newline at end of file diff --git a/terraform/do_domains/records_home.jowj.net.tf b/terraform/do_domains/records_home.jowj.net.tf index 0775b05..fa9fa16 100644 --- a/terraform/do_domains/records_home.jowj.net.tf +++ b/terraform/do_domains/records_home.jowj.net.tf @@ -232,15 +232,4 @@ resource "digitalocean_record" highsea-dns { # this motherfucker is currently set manually. # TODO: Figure out how to do this programmatically -# Especailly because getting the output of tailscale is difficult?? -resource "digitalocean_record" mattermost-dns { - domain = "home.jowj.net" - flags = "0" - name = "mattermost" - port = "0" - priority = "0" - ttl = "900" - type = "A" - value = "100.101.221.122" - weight = "0" -} \ No newline at end of file +# Especailly because getting the output of tailscale is difficult?? \ No newline at end of file