2019-02-09 10:20:11 +00:00
|
|
|
---
|
2019-03-04 20:38:36 +00:00
|
|
|
- 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
|
2019-02-09 10:20:11 +00:00
|
|
|
|
|
|
|
- name: matrix network
|
|
|
|
docker_network:
|
|
|
|
name: matrix
|
|
|
|
|
2019-02-09 14:43:15 +00:00
|
|
|
- name: upload riot config.json
|
|
|
|
template:
|
2019-03-04 20:38:36 +00:00
|
|
|
src: files/configs/riot/config.json
|
|
|
|
dest: "{{ riot.volume_folder }}/data/config.json"
|
2019-02-09 14:43:15 +00:00
|
|
|
|
|
|
|
- name: upload riot.im.conf
|
|
|
|
template:
|
2019-03-04 20:38:36 +00:00
|
|
|
src: files/configs/riot/riot.im.conf
|
|
|
|
dest: "{{ riot.volume_folder }}/data/riot.im.conf"
|
2019-02-09 14:43:15 +00:00
|
|
|
|
2019-03-05 07:28:53 +00:00
|
|
|
- name: upload vhost config for root domain
|
|
|
|
template:
|
|
|
|
src: files/configs/matrix/vhost-root
|
|
|
|
dest: "{{ nginx.volume_folder }}/vhost/{{ base_domain }}"
|
|
|
|
|
2019-02-09 10:20:11 +00:00
|
|
|
- name: matrix database container
|
|
|
|
docker_container:
|
|
|
|
name: matrix_db
|
|
|
|
image: postgres:10
|
|
|
|
state: started
|
|
|
|
restart_policy: always
|
|
|
|
networks:
|
2019-02-09 14:43:15 +00:00
|
|
|
- name: matrix
|
2019-02-09 10:20:11 +00:00
|
|
|
volumes:
|
2019-03-04 20:38:36 +00:00
|
|
|
- "{{ matrix.volume_folder }}/db:/var/lib/postgresql/data"
|
2019-02-09 10:20:11 +00:00
|
|
|
env:
|
2019-02-09 17:49:03 +00:00
|
|
|
POSTGRES_USER: "synapse"
|
2019-02-09 10:20:11 +00:00
|
|
|
POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}"
|
2019-02-09 14:43:15 +00:00
|
|
|
|
2019-02-09 17:49:03 +00:00
|
|
|
- name: matrix container
|
|
|
|
docker_container:
|
|
|
|
name: matrix
|
|
|
|
image: matrixdotorg/synapse:latest
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
networks:
|
|
|
|
- name: matrix
|
2019-03-05 08:04:47 +00:00
|
|
|
published_ports:
|
|
|
|
- "8008"
|
2019-02-09 17:49:03 +00:00
|
|
|
env:
|
2019-02-13 08:49:22 +00:00
|
|
|
SYNAPSE_SERVER_NAME: "{{ base_domain }}"
|
2019-02-09 17:49:03 +00:00
|
|
|
SYNAPSE_REPORT_STATS: "False"
|
|
|
|
SYNAPSE_ENABLE_REGISTRATION: "True"
|
|
|
|
SYNAPSE_LOG_LEVEL: "INFO"
|
|
|
|
SYNAPSE_NO_TLS: "1"
|
|
|
|
POSTGRES_HOST: "matrix_db"
|
|
|
|
POSTGRES_USER: "synapse"
|
|
|
|
POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}"
|
|
|
|
VIRTUAL_HOST: "{{ matrix.domain }}"
|
|
|
|
VIRTUAL_PORT: "8008"
|
|
|
|
LETSENCRYPT_HOST: "{{ matrix.domain }}"
|
|
|
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
|
|
|
|
2019-02-09 14:43:15 +00:00
|
|
|
- name: riot container
|
|
|
|
docker_container:
|
|
|
|
name: riot_app
|
2019-02-15 23:38:44 +00:00
|
|
|
image: avhost/docker-matrix-riot:v1.0.0
|
2019-02-09 14:43:15 +00:00
|
|
|
state: started
|
|
|
|
restart_policy: always
|
|
|
|
networks:
|
|
|
|
- name: matrix
|
|
|
|
- name: external_services
|
2019-02-09 17:49:03 +00:00
|
|
|
published_ports:
|
2019-03-04 20:38:36 +00:00
|
|
|
- "8080"
|
|
|
|
volumes:
|
|
|
|
- "{{ riot.volume_folder }}/data:/data"
|
2019-02-09 15:00:04 +00:00
|
|
|
env:
|
|
|
|
VIRTUAL_HOST: "{{ riot.domain }}"
|
2019-02-09 17:49:03 +00:00
|
|
|
VIRTUAL_PORT: "8080"
|
2019-02-09 15:00:04 +00:00
|
|
|
LETSENCRYPT_HOST: "{{ riot.domain }}"
|
|
|
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|