mirror of
https://github.com/reonokiy/compose.git
synced 2025-06-15 05:02:52 +02:00
92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
services:
|
|
|
|
synapse:
|
|
image: ghcr.io/element-hq/synapse:v1.130.0
|
|
container_name: synapse
|
|
restart: unless-stopped
|
|
environment:
|
|
SYNAPSE_CONFIG_PATH: /data/homeserver.yaml
|
|
UID: 1000
|
|
GID: 1000
|
|
volumes:
|
|
- ${DATA_DIR:-./data}/synapse:/data
|
|
- ${DATA_DIR:-./data}/homeserver.yaml:/data/homeserver.yaml:ro
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
ports:
|
|
- 8448:8448
|
|
|
|
postgres:
|
|
image: postgres:17.5
|
|
container_name: synapse-postgres
|
|
restart: always
|
|
environment:
|
|
POSTGRES_DB: synapse
|
|
POSTGRES_USER: synapse
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-synapse}
|
|
# ensure the database gets created correctly
|
|
# https://matrix-org.github.io/synapse/latest/postgres.html#set-up-database
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
|
|
volumes:
|
|
- ${DATA_DIR:-./data}/postgres:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U synapse"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
redis:
|
|
image: redis:8
|
|
container_name: synapse-redis
|
|
restart: always
|
|
command: --save 60 1 --loglevel warning
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
|
start_period: 20s
|
|
interval: 30s
|
|
retries: 5
|
|
timeout: 3s
|
|
volumes:
|
|
- ${DATA_DIR:-./data}/redis:/data
|
|
|
|
mas:
|
|
image: ghcr.io/element-hq/matrix-authentication-service:0.16.0
|
|
container_name: mas
|
|
restart: unless-stopped
|
|
command: ["server", "--config", "/data/config.yaml"]
|
|
volumes:
|
|
- ${DATA_DIR:-./data}/mas.yaml:/data/config.yaml:ro
|
|
depends_on:
|
|
mas-postgres:
|
|
condition: service_healthy
|
|
|
|
syn2mas:
|
|
restart: "no"
|
|
image: ghcr.io/element-hq/matrix-authentication-service/syn2mas:0.14.0
|
|
volumes:
|
|
- ${DATA_DIR:-./data}/mas.yaml:/mas.yaml:ro
|
|
- ${DATA_DIR:-./data}/homeserver.yaml:/homeserver.yaml:ro
|
|
|
|
mas-postgres:
|
|
image: postgres:17.5
|
|
container_name: mas-postgres
|
|
restart: always
|
|
environment:
|
|
POSTGRES_DB: mas
|
|
POSTGRES_USER: mas
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-synapse}
|
|
# ensure the database gets created correctly
|
|
# https://matrix-org.github.io/synapse/latest/postgres.html#set-up-database
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
|
|
volumes:
|
|
- ${DATA_DIR:-./data}/mas-postgres:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U mas"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|