2022-01-29 00:15:18 +00:00
|
|
|
secrets:
|
|
|
|
postgres_password:
|
|
|
|
file: ./postgres_password.txt
|
2022-01-28 21:31:32 +00:00
|
|
|
|
2022-02-03 13:16:31 +00:00
|
|
|
networks:
|
|
|
|
frontend:
|
2022-04-21 19:25:13 +00:00
|
|
|
external: ${DOCKER_PROXY_EXT-true}
|
2022-02-03 13:16:31 +00:00
|
|
|
name: ${DOCKER_PROXY_NETWORK}
|
|
|
|
backend:
|
|
|
|
|
2022-01-28 21:31:32 +00:00
|
|
|
services:
|
2022-08-22 21:20:19 +00:00
|
|
|
# Uncomment if you want to use PostgreSQL in a Docker container
|
|
|
|
# postgres:
|
|
|
|
# image: postgres:${POSTGRESQL_IMAGE_TAG}
|
|
|
|
# restart: unless-stopped
|
|
|
|
# volumes:
|
|
|
|
# - ${VOLUME_PATH}/var/lib/postgresql/data:/var/lib/postgresql/data:rw
|
|
|
|
# secrets:
|
|
|
|
# - postgres_password
|
|
|
|
# networks:
|
|
|
|
# - backend
|
|
|
|
# environment:
|
|
|
|
# POSTGRES_DB: synapse
|
|
|
|
# POSTGRES_USER: synapse_user
|
|
|
|
# POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
|
|
|
|
# POSTGRES_INITDB_ARGS: --encoding=UTF8 --locale=C
|
2022-01-29 00:15:18 +00:00
|
|
|
|
2022-04-21 19:25:13 +00:00
|
|
|
redis:
|
|
|
|
image: redis:${REDIS_IMAGE_TAG}
|
|
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
|
2022-01-28 21:31:32 +00:00
|
|
|
synapse:
|
2022-01-29 00:15:18 +00:00
|
|
|
image: matrixdotorg/synapse:${SYNAPSE_IMAGE_TAG}
|
2022-01-28 21:31:32 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
2022-02-02 16:53:57 +00:00
|
|
|
- ${VOLUME_PATH}/data:/data:rw
|
2022-02-21 13:28:46 +00:00
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
2022-08-22 20:39:53 +00:00
|
|
|
max-size: "100M"
|
2022-02-21 13:29:55 +00:00
|
|
|
max-file: "3"
|
2022-08-22 20:39:53 +00:00
|
|
|
mem_limit: ${SYNAPSE_MEM_LIMIT:-2g}
|
2022-01-29 00:48:09 +00:00
|
|
|
ports:
|
2022-02-02 16:53:57 +00:00
|
|
|
- ${SYNAPSE_PORT}:8008
|
2022-02-03 13:16:31 +00:00
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
2022-01-28 21:31:32 +00:00
|
|
|
environment:
|
2022-02-02 16:53:57 +00:00
|
|
|
SYNAPSE_CONFIG_DIR: /data
|
|
|
|
SYNAPSE_CONFIG_PATH: /data/${CONFIG_FILE_NAME}
|
2022-01-28 21:31:32 +00:00
|
|
|
UID: ${UID}
|
|
|
|
GID: ${GID}
|
|
|
|
TZ: ${TZ}
|
2022-01-29 00:15:18 +00:00
|
|
|
depends_on:
|
|
|
|
- postgres
|
2022-08-22 20:39:53 +00:00
|
|
|
|
|
|
|
synapse-generic-worker-1:
|
|
|
|
image: matrixdotorg/synapse:${SYNAPSE_IMAGE_TAG}
|
|
|
|
restart: unless-stopped
|
|
|
|
entrypoint: ["/start.py", "run", "--config-path=/data/${CONFIG_FILE_NAME}", "--config-path=/data/workers/synapse-generic-worker-1.yaml"]
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "curl -fSs http://localhost:8081/health || exit 1"]
|
|
|
|
start_period: "5s"
|
|
|
|
interval: "15s"
|
|
|
|
timeout: "5s"
|
|
|
|
volumes:
|
|
|
|
- ${VOLUME_PATH}/data:/data:rw
|
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "100M"
|
|
|
|
max-file: "3"
|
|
|
|
mem_limit: ${WORKER_MEM_LIMIT:-512m}
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
environment:
|
|
|
|
SYNAPSE_CONFIG_DIR: /data
|
|
|
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
|
|
depends_on:
|
|
|
|
- synapse
|
|
|
|
|
|
|
|
synapse-generic-worker-2:
|
|
|
|
image: matrixdotorg/synapse:${SYNAPSE_IMAGE_TAG}
|
|
|
|
restart: unless-stopped
|
|
|
|
entrypoint: ["/start.py", "run", "--config-path=/data/${CONFIG_FILE_NAME}", "--config-path=/data/workers/synapse-generic-worker-2.yaml"]
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "curl -fSs http://localhost:8081/health || exit 1"]
|
|
|
|
start_period: "5s"
|
|
|
|
interval: "15s"
|
|
|
|
timeout: "5s"
|
|
|
|
volumes:
|
|
|
|
- ${VOLUME_PATH}/data:/data:rw
|
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "100M"
|
|
|
|
max-file: "3"
|
|
|
|
mem_limit: ${WORKER_MEM_LIMIT:-512m}
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
environment:
|
|
|
|
SYNAPSE_CONFIG_DIR: /data
|
|
|
|
SYNAPSE_WORKER: synapse.app.generic_worker
|
|
|
|
depends_on:
|
|
|
|
- synapse
|
|
|
|
|
|
|
|
synapse-federation-sender-1:
|
|
|
|
image: matrixdotorg/synapse:${SYNAPSE_IMAGE_TAG}
|
|
|
|
restart: unless-stopped
|
|
|
|
entrypoint: ["/start.py", "run", "--config-path=/data/${CONFIG_FILE_NAME}", "--config-path=/data/workers/synapse-federation-sender-1.yaml"]
|
|
|
|
healthcheck:
|
|
|
|
disable: true
|
|
|
|
volumes:
|
|
|
|
- ${VOLUME_PATH}/data:/data:rw
|
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "100M"
|
|
|
|
max-file: "3"
|
|
|
|
mem_limit: ${WORKER_MEM_LIMIT:-512m}
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
environment:
|
|
|
|
SYNAPSE_CONFIG_DIR: /data
|
|
|
|
SYNAPSE_WORKER: synapse.app.federation_sender
|
|
|
|
depends_on:
|
|
|
|
- synapse
|
|
|
|
|
|
|
|
synapse-federation-sender-2:
|
|
|
|
image: matrixdotorg/synapse:${SYNAPSE_IMAGE_TAG}
|
|
|
|
restart: unless-stopped
|
|
|
|
entrypoint: ["/start.py", "run", "--config-path=/data/${CONFIG_FILE_NAME}", "--config-path=/data/workers/synapse-federation-sender-2.yaml"]
|
|
|
|
healthcheck:
|
|
|
|
disable: true
|
|
|
|
volumes:
|
|
|
|
- ${VOLUME_PATH}/data:/data:rw
|
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "100M"
|
|
|
|
max-file: "3"
|
|
|
|
mem_limit: ${WORKER_MEM_LIMIT:-512m}
|
|
|
|
networks:
|
|
|
|
- backend
|
|
|
|
environment:
|
|
|
|
SYNAPSE_CONFIG_DIR: /data
|
|
|
|
SYNAPSE_WORKER: synapse.app.federation_sender
|
|
|
|
depends_on:
|
|
|
|
- synapse
|