From 0cb7a79bde8b73a7545c21891efa403371055c9e Mon Sep 17 00:00:00 2001 From: Linuro Date: Mon, 4 Jan 2021 21:58:19 +0100 Subject: [PATCH] Initial commit --- docker-compose.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9b88f2d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,56 @@ +version: "3.4" +networks: + db: + web: + external: + name: proxy_web +services: + synapse: + image: "matrixdotorg/synapse" + volumes: + - "/data/config/matrix/synapse/:/data/" + environment: + - "SYNAPSE_SERVER_NAME=zom.bi" + labels: + - "traefik.enable=true" + - "traefik.http.routers.matrix.rule=Host(`matrix.zom.bi`) && PathPrefix(`/_matrix/`)" + - "traefik.http.routers.matrix.entrypoints=websecure" + - "traefik.http.routers.matrix.tls=true" + - "traefik.http.routers.matrix.tls.certresolver=default" + - "traefik.http.services.matrix.loadbalancer.server.port=8008" + - "traefik.docker.network=proxy_web" + networks: + - web + - db + riot: + image: "vectorim/element-web" + labels: + - "traefik.enable=true" + - "traefik.http.routers.riot.rule=Host(`riot.zom.bi`, `matrix.zom.bi`)" + - "traefik.http.routers.riot.entrypoints=websecure" + - "traefik.http.routers.riot.tls=true" + - "traefik.http.routers.riot.tls.certresolver=default" + - "traefik.http.services.riot.loadbalancer.server.port=80" + - "traefik.docker.network=proxy_web" + volumes: + - "/data/config/matrix/riot/config.json:/app/config.json" + networks: + - web + + db: + image: postgres:10 + environment: + POSTGRES_USER: synapse + POSTGRES_PASSWORD: tp4ssw0rd + LANG: C + POSTGRES_DB: synapse + POSTGRES_INITDB_ARGS: "--encoding='UTF8' --lc-collate='C' --lc-ctype='C'" + healthcheck: + test: '/usr/bin/psql --username synapse --command "SELECT 1;"' + interval: 2s + timeout: 5s + retries: 30 + volumes: + - "/data/config/matrix/db:/var/lib/postgresql/data" + networks: + - db