diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0a1e613 --- /dev/null +++ b/docker-compose.yml @@ -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