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 restart: always healthcheck: test: pg_isready -U synapse -d synapsedb interval: 10s timeout: 5s retries: 5 redis: image: redis:latest restart: always healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 3 synapse: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always environment: - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml volumes: - ./data/synapse:/data depends_on: - postgres - redis ports: - 127.0.0.1:8008:8008/tcp labels: synapse-autoheal: "true" sender1: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always 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 healthcheck: disable: true sender2: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always 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 healthcheck: disable: true media: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always 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 ports: - 127.0.0.1:8009:8008 labels: synapse-autoheal: "true" generic1: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always 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 ports: - 127.0.0.1:8010:8008/tcp labels: synapse-autoheal: "true" generic2: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always 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 ports: - 127.0.0.1:8011:8008/tcp labels: synapse-autoheal: "true" prometheus: image: prom/prometheus:latest restart: always command: - --config.file=/etc/prometheus/prometheus.yml volumes: - ./conf/prometheus.yml:/etc/prometheus/prometheus.yml - ./data/prometheus:/prometheus networks: default: grafana_default: aliases: - synapse_prometheus networks: grafana_default: external: true