forked from data.coop/ansible
Rearrange matrix+riot ansible script, move volumes to host mounts.
This commit is contained in:
parent
55c8e77254
commit
1f8b1827ff
|
@ -23,9 +23,11 @@ fider:
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
domain: "matrix.{{ base_domain }}"
|
domain: "matrix.{{ base_domain }}"
|
||||||
|
volume_folder: "{{ volume_root_folder }}/matrix"
|
||||||
|
|
||||||
riot:
|
riot:
|
||||||
domain: "riot.{{ base_domain }}"
|
domain: "riot.{{ base_domain }}"
|
||||||
|
volume_folder: "{{ volume_root_folder }}/riot"
|
||||||
|
|
||||||
privatebin:
|
privatebin:
|
||||||
domain: "paste.{{ base_domain }}"
|
domain: "paste.{{ base_domain }}"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"feature_tabbed_settings": "enable",
|
"feature_tabbed_settings": "enable",
|
||||||
"feature_sas": "enable"
|
"feature_sas": "enable"
|
||||||
},
|
},
|
||||||
"welcomeUserId": "@riot-bot:matrix.org",
|
"welcomeUserId": "",
|
||||||
"piwik": false,
|
"piwik": false,
|
||||||
"roomDirectory": {
|
"roomDirectory": {
|
||||||
"servers": [
|
"servers": [
|
|
@ -1,26 +1,35 @@
|
||||||
---
|
---
|
||||||
|
- name: create matrix volume folders
|
||||||
|
file:
|
||||||
|
name: "{{ matrix.volume_folder }}/{{ volume }}"
|
||||||
|
state: directory
|
||||||
|
loop:
|
||||||
|
- "db"
|
||||||
|
loop_control:
|
||||||
|
loop_var: volume
|
||||||
|
|
||||||
|
- name: create riot volume folders
|
||||||
|
file:
|
||||||
|
name: "{{ riot.volume_folder }}/{{ volume }}"
|
||||||
|
state: directory
|
||||||
|
loop:
|
||||||
|
- "data"
|
||||||
|
loop_control:
|
||||||
|
loop_var: volume
|
||||||
|
|
||||||
- name: matrix network
|
- name: matrix network
|
||||||
docker_network:
|
docker_network:
|
||||||
name: matrix
|
name: matrix
|
||||||
|
|
||||||
- name: matrix database volume
|
|
||||||
docker_volume:
|
|
||||||
name: matrix_db
|
|
||||||
|
|
||||||
- name: riot volume
|
|
||||||
docker_volume:
|
|
||||||
name: riot_app
|
|
||||||
|
|
||||||
- name: upload riot config.json
|
- name: upload riot config.json
|
||||||
template:
|
template:
|
||||||
src: files/configs/riot-config.json
|
src: files/configs/riot/config.json
|
||||||
dest: /var/lib/docker/volumes/riot_app/_data/config.json
|
dest: "{{ riot.volume_folder }}/data/config.json"
|
||||||
|
|
||||||
- name: upload riot.im.conf
|
- name: upload riot.im.conf
|
||||||
template:
|
template:
|
||||||
src: files/configs/riot.im.conf
|
src: files/configs/riot/riot.im.conf
|
||||||
dest: /var/lib/docker/volumes/riot_app/_data/riot.im.conf
|
dest: "{{ riot.volume_folder }}/data/riot.im.conf"
|
||||||
|
|
||||||
- name: matrix database container
|
- name: matrix database container
|
||||||
docker_container:
|
docker_container:
|
||||||
|
@ -31,7 +40,7 @@
|
||||||
networks:
|
networks:
|
||||||
- name: matrix
|
- name: matrix
|
||||||
volumes:
|
volumes:
|
||||||
- matrix_db:/var/lib/postgresql/data
|
- "{{ matrix.volume_folder }}/db:/var/lib/postgresql/data"
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: "synapse"
|
POSTGRES_USER: "synapse"
|
||||||
POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}"
|
POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}"
|
||||||
|
@ -43,9 +52,6 @@
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- name: matrix
|
- name: matrix
|
||||||
published_ports:
|
|
||||||
- 8008:8008
|
|
||||||
- 8448:8448
|
|
||||||
env:
|
env:
|
||||||
SYNAPSE_SERVER_NAME: "{{ base_domain }}"
|
SYNAPSE_SERVER_NAME: "{{ base_domain }}"
|
||||||
SYNAPSE_REPORT_STATS: "False"
|
SYNAPSE_REPORT_STATS: "False"
|
||||||
|
@ -69,13 +75,12 @@
|
||||||
networks:
|
networks:
|
||||||
- name: matrix
|
- name: matrix
|
||||||
- name: external_services
|
- name: external_services
|
||||||
volumes:
|
|
||||||
- riot_app:/data
|
|
||||||
published_ports:
|
published_ports:
|
||||||
- 8080
|
- "8080"
|
||||||
|
volumes:
|
||||||
|
- "{{ riot.volume_folder }}/data:/data"
|
||||||
env:
|
env:
|
||||||
VIRTUAL_HOST: "{{ riot.domain }}"
|
VIRTUAL_HOST: "{{ riot.domain }}"
|
||||||
VIRTUAL_PORT: "8080"
|
VIRTUAL_PORT: "8080"
|
||||||
LETSENCRYPT_HOST: "{{ riot.domain }}"
|
LETSENCRYPT_HOST: "{{ riot.domain }}"
|
||||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue