This repository has been archived on 2022-01-30. You can view files and clone it, but cannot push or open issues or pull requests.
synapse/docker-compose.yml

303 lines
7.4 KiB
YAML
Raw Normal View History

2021-07-31 14:39:23 -05:00
version: '3'
services:
#autoheal:
# restart: always
# image: willfarrell/autoheal
# environment:
# - AUTOHEAL_CONTAINER_LABEL=synapse-autoheal
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
postgres:
image: postgres:latest
environment:
- POSTGRES_USER=synapse
- POSTGRES_PASSWORD
- POSTGRES_DB=synapsedb
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
volumes:
- ./data/postgres:/var/lib/postgresql/data/
- ./progs:/progs
networks:
default:
grafana:
aliases:
- synapse_postgres
restart: always
healthcheck:
test: pg_isready -U synapse -d synapsedb
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
restart: always
networks:
default:
grafana:
aliases:
- synapse_redis
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
synapse:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_synapse
2021-07-31 14:39:23 -05:00
environment:
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
volumes:
- ./data/synapse:/data
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
ports:
- 127.0.0.1:8008:8008/tcp
labels:
synapse-autoheal: "true"
mem_limit: 2G
sender1:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_sender1
2021-07-31 14:39:23 -05:00
command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender1.yaml"]
environment:
- SYNAPSE_WORKER=synapse.app.federation_sender
volumes:
- ./data/synapse:/data
- ./workers:/workers
depends_on:
synapse:
condition: service_healthy
healthcheck:
disable: true
mem_limit: 2G
sender2:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_sender2
2021-07-31 14:39:23 -05:00
command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender2.yaml"]
environment:
- SYNAPSE_WORKER=synapse.app.federation_sender
volumes:
- ./data/synapse:/data
- ./workers:/workers
depends_on:
synapse:
condition: service_healthy
healthcheck:
disable: true
mem_limit: 2G
sender3:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_sender3
2021-07-31 14:39:23 -05:00
command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender3.yaml"]
environment:
- SYNAPSE_WORKER=synapse.app.federation_sender
volumes:
- ./data/synapse:/data
- ./workers:/workers
depends_on:
synapse:
condition: service_healthy
healthcheck:
disable: true
mem_limit: 2G
sender4:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_sender4
2021-07-31 14:39:23 -05:00
command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender4.yaml"]
environment:
- SYNAPSE_WORKER=synapse.app.federation_sender
volumes:
- ./data/synapse:/data
- ./workers:/workers
depends_on:
synapse:
condition: service_healthy
healthcheck:
disable: true
mem_limit: 2G
media:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_media
2021-07-31 14:39:23 -05:00
command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/media.yaml"]
environment:
- SYNAPSE_WORKER=synapse.app.media_repository
volumes:
- ./data/synapse:/data
- ./workers:/workers
depends_on:
synapse:
condition: service_healthy
ports:
- 127.0.0.1:8009:8008
labels:
synapse-autoheal: "true"
mem_limit: 2G
generic1:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_generic1
2021-07-31 14:39:23 -05:00
command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"]
environment:
- SYNAPSE_WORKER=synapse.app.generic_worker
volumes:
- ./data/synapse:/data
- ./workers:/workers
depends_on:
synapse:
condition: service_healthy
ports:
- 127.0.0.1:8010:8008/tcp
labels:
synapse-autoheal: "true"
mem_limit: 2G
generic2:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_generic2
2021-07-31 14:39:23 -05:00
command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"]
environment:
- SYNAPSE_WORKER=synapse.app.generic_worker
volumes:
- ./data/synapse:/data
- ./workers:/workers
depends_on:
synapse:
condition: service_healthy
ports:
- 127.0.0.1:8011:8008/tcp
labels:
synapse-autoheal: "true"
mem_limit: 2G
generic3:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_generic3
2021-07-31 14:39:23 -05:00
command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"]
environment:
- SYNAPSE_WORKER=synapse.app.generic_worker
volumes:
- ./data/synapse:/data
- ./workers:/workers
depends_on:
synapse:
condition: service_healthy
ports:
- 127.0.0.1:8012:8008/tcp
labels:
synapse-autoheal: "true"
mem_limit: 2G
generic4:
image: matrixdotorg/synapse:$SYNAPSE_TAG
restart: always
2021-08-02 02:47:17 -05:00
networks:
default:
grafana:
aliases:
- synapse_generic4
2021-07-31 14:39:23 -05:00
command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"]
environment:
- SYNAPSE_WORKER=synapse.app.generic_worker
volumes:
- ./data/synapse:/data
- ./workers:/workers
depends_on:
synapse:
condition: service_healthy
ports:
- 127.0.0.1:8013:8008/tcp
labels:
synapse-autoheal: "true"
mem_limit: 2G
2021-08-02 02:47:17 -05:00
#redis_exporter:
# image: oliver006/redis_exporter
# restart: always
# networks:
# default:
# grafana:
# aliases:
# - synapse_redis_exporter
# environment:
# - REDIS_ADDR=redis://redis:6379
# depends_on:
# redis:
# condition: service_healthy
2021-07-31 14:39:23 -05:00
2021-08-02 02:47:17 -05:00
#postgres_exporter:
# image: quay.io/prometheuscommunity/postgres-exporter:latest
# restart: always
# networks:
# default:
# grafana:
# aliases:
# - synapse_postgres_exporter
# environment:
# - DATA_SOURCE_NAME=postgresql://synapse:$POSTGRES_PASSWORD@postgres:5432/synapsedb?sslmode=disable
# depends_on:
# postgres:
# condition: service_healthy
2021-07-31 14:39:23 -05:00
networks:
grafana:
external: true
name: grafana_default