mirror of
https://github.com/reonokiy/compose.git
synced 2025-06-16 05:32:52 +02:00
add synapse
This commit is contained in:
parent
f9e100ed89
commit
2338da6492
1 changed files with 32 additions and 0 deletions
32
synapse/docker-compose.yaml
Normal file
32
synapse/docker-compose.yaml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
services:
|
||||||
|
|
||||||
|
synapse:
|
||||||
|
image: ghcr.io/element-hq/synapse:v1.128.0
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
|
||||||
|
volumes:
|
||||||
|
- ${DATA_DIR:-./data}/data:/data
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
ports:
|
||||||
|
- 8448:8448
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres:17.5-bookworm
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: ${POSTGRES_DB:-synapse}
|
||||||
|
POSTGRES_USER: ${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}/db:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-synapse}"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
start_period: 30s
|
Loading…
Add table
Add a link
Reference in a new issue