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