forked from data.coop/ansible
Rewrite matrix/riot to use docker_service
This commit is contained in:
parent
ada37f206a
commit
1f69fdc3b4
|
@ -26,10 +26,6 @@
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: volume
|
loop_var: volume
|
||||||
|
|
||||||
- name: matrix network
|
|
||||||
docker_network:
|
|
||||||
name: matrix
|
|
||||||
|
|
||||||
- name: upload riot config.json
|
- name: upload riot config.json
|
||||||
template:
|
template:
|
||||||
src: files/configs/riot/config.json
|
src: files/configs/riot/config.json
|
||||||
|
@ -60,54 +56,64 @@
|
||||||
src: "files/configs/matrix/matrix.data.coop.log.config"
|
src: "files/configs/matrix/matrix.data.coop.log.config"
|
||||||
dest: "{{ matrix.volume_folder }}/data/matrix.data.coop.log.config"
|
dest: "{{ matrix.volume_folder }}/data/matrix.data.coop.log.config"
|
||||||
|
|
||||||
- name: matrix database container
|
- name: set up matrix and riot
|
||||||
docker_container:
|
docker_service:
|
||||||
name: matrix_db
|
project_name: matrix
|
||||||
image: postgres:10
|
pull: yes
|
||||||
state: started
|
definition:
|
||||||
restart_policy: always
|
version: "3.6"
|
||||||
networks:
|
services:
|
||||||
- name: matrix
|
matrix_db:
|
||||||
volumes:
|
container_name: matrix_db
|
||||||
- "{{ matrix.volume_folder }}/db:/var/lib/postgresql/data"
|
image: postgres:10
|
||||||
env:
|
restart: unless-stopped
|
||||||
POSTGRES_USER: "synapse"
|
networks:
|
||||||
POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}"
|
- matrix
|
||||||
|
volumes:
|
||||||
|
- "{{ matrix.volume_folder }}/db:/var/lib/postgresql/data"
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: "synapse"
|
||||||
|
POSTGRES_PASSWORD: "{{ postgres_passwords.matrix }}"
|
||||||
|
|
||||||
- name: matrix container
|
matrix_app:
|
||||||
docker_container:
|
container_name: matrix
|
||||||
name: matrix
|
image: matrixdotorg/synapse:v0.99.2
|
||||||
image: matrixdotorg/synapse:v0.99.2
|
restart: unless-stopped
|
||||||
restart_policy: unless-stopped
|
networks:
|
||||||
networks:
|
- matrix
|
||||||
- name: matrix
|
- external_services
|
||||||
published_ports:
|
ports:
|
||||||
- "8008"
|
- 8008
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ matrix.volume_folder }}/data:/data"
|
- "{{ matrix.volume_folder }}/data:/data"
|
||||||
env:
|
environment:
|
||||||
SYNAPSE_CONFIG_PATH: "/data/homeserver.yaml"
|
SYNAPSE_CONFIG_PATH: "/data/homeserver.yaml"
|
||||||
SYNAPSE_LOG_LEVEL: "INFO"
|
SYNAPSE_LOG_LEVEL: "INFO"
|
||||||
VIRTUAL_HOST: "{{ matrix.domain }}"
|
VIRTUAL_HOST: "{{ matrix.domain }}"
|
||||||
VIRTUAL_PORT: "8008"
|
VIRTUAL_PORT: "8008"
|
||||||
LETSENCRYPT_HOST: "{{ matrix.domain }}"
|
LETSENCRYPT_HOST: "{{ matrix.domain }}"
|
||||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||||
|
|
||||||
- name: riot container
|
riot:
|
||||||
docker_container:
|
container_name: riot_app
|
||||||
name: riot_app
|
image: avhost/docker-matrix-riot:v1.0.3
|
||||||
image: avhost/docker-matrix-riot:v1.0.3
|
restart: unless-stopped
|
||||||
state: started
|
networks:
|
||||||
restart_policy: always
|
- matrix
|
||||||
networks:
|
- external_services
|
||||||
- name: matrix
|
ports:
|
||||||
- name: external_services
|
- 8080
|
||||||
published_ports:
|
volumes:
|
||||||
- "8080"
|
- "{{ riot.volume_folder }}/data:/data"
|
||||||
volumes:
|
environment:
|
||||||
- "{{ riot.volume_folder }}/data:/data"
|
VIRTUAL_HOST: "{{ riot.domain }}"
|
||||||
env:
|
VIRTUAL_PORT: "8080"
|
||||||
VIRTUAL_HOST: "{{ riot.domain }}"
|
LETSENCRYPT_HOST: "{{ riot.domain }}"
|
||||||
VIRTUAL_PORT: "8080"
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||||
LETSENCRYPT_HOST: "{{ riot.domain }}"
|
|
||||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
networks:
|
||||||
|
external_services:
|
||||||
|
external:
|
||||||
|
name: external_services
|
||||||
|
matrix:
|
||||||
|
name: "matrix"
|
||||||
|
|
Loading…
Reference in a new issue