Create docker-compose.yml

This commit is contained in:
Tommy 2022-01-13 10:22:49 -05:00 committed by GitHub
parent 0b55463340
commit ca1d18d755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

32
docker-compose.yml Normal file
View File

@ -0,0 +1,32 @@
# This compose file is compatible with Compose itself, it might need some
# adjustments to run properly with stack.
version: '3'
services:
synapse:
image: docker.io/matrixdotorg/synapse:latest
# Since synapse does not retry to connect to the database, restart upon
# failure
restart: unless-stopped
# See the readme for a full documentation of the environment settings
# NOTE: You must edit homeserver.yaml to use postgres, it defaults to sqlite
environment:
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
volumes:
- ./files:/data:Z
depends_on:
- db
ports:
- 127.0.0.1:8448:8448/tcp
db:
image: docker.io/postgres:12-alpine
# Change that password, of course!
environment:
- POSTGRES_USER=synapse
- POSTGRES_PASSWORD=changeme
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
volumes:
- ./schemas:/var/lib/postgresql/data:Z