Add basic Synapse server configuration

This commit is contained in:
Salt 2021-10-02 22:03:22 -05:00
parent aceba8407b
commit e05d4a379b
3 changed files with 50 additions and 0 deletions

34
playbooks/prod_com.yml Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
# Webservers
---
- hosts: com1.desu.ltd
module_defaults:
docker_container:
state: started
restart_policy: unless-stopped
pull: yes
pre_tasks:
- name: ensure docker network
docker_network: name=web
tags: [ docker ]
tasks:
- name: include tasks for applications
include_tasks: tasks/{{ item }}
with_items:
- web/synapse.yml
tags: [ always ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data
tags: [ backup ]
- role: ingress
vars:
ingress_servers:
- name: matrix.desu.ltd
proxy_pass: http://synapse:8008
directives:
- "client_max_body_size 0"
tags: [ web, docker, ingress ]

View File

@ -0,0 +1,15 @@
# vim:ft=ansible:
- name: docker deploy synapse
docker_container:
name: synapse
image: matrixdotorg/synapse:latest
env:
TZ: "America/Chicago"
SYNAPSE_SERVER_NAME: matrix.desu.ltd
SYNAPSE_REPORT_STATS: "no"
networks:
- name: web
aliases: [ "synapse" ]
volumes:
- /data/synapse:/data
tags: [ docker, synapse ]

View File

@ -19,6 +19,7 @@
# Production configuration
- import_playbook: playbooks/prod_db.yml
- import_playbook: playbooks/prod_web.yml
- import_playbook: playbooks/prod_com.yml
- import_playbook: playbooks/prod_game.yml
# Supplementary tags
- import_playbook: playbooks/tags_ansible.yml