Created
June 16, 2021 00:20
-
-
Save jivanpal/2fd7cd403b46faaed00671f370f2fba2 to your computer and use it in GitHub Desktop.
Revisions
-
jivanpal created this gist
Jun 16, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ # Version 2 required in order to impose resource limits in Docker Compose (non-Swarm) environment version: '2.2' services: synapse: image: matrixdotorg/synapse:latest container_name: synapse # Since synapse does not retry to connect to the database, restart upon failure restart: unless-stopped environment: - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml volumes: - ./files:/data depends_on: - db ports: - 8008:8008 # Resource limits #cpus: 0.5 mem_limit: 1536m memswap_limit: 8G db: image: postgres:12-alpine container_name: synapse_db restart: unless-stopped environment: - POSTGRES_USER=synapse - POSTGRES_PASSWORD=obviously not my actual password # Ensure the database gets created correctly # See: https://github.com/matrix-org/synapse/blob/master/docs/postgres.md#set-up-database - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C volumes: - ./schemas:/var/lib/postgresql/data