summary refs log tree commit diff
path: root/contrib/docker/docker-compose.yml
diff options
context:
space:
mode:
authorkaiyou <pierre@jaury.eu>2018-02-04 15:04:26 +0100
committerkaiyou <pierre@jaury.eu>2018-02-04 15:04:26 +0100
commita207cccb059451682564cddf0e39c7c45b06cb72 (patch)
treeb6ea40380ac21e762b95580a2b58f166e6180485 /contrib/docker/docker-compose.yml
parentProvide an example docker compose file (diff)
downloadsynapse-a207cccb059451682564cddf0e39c7c45b06cb72.tar.xz
Reuse environment variables of the postgres container
Diffstat (limited to '')
-rw-r--r--contrib/docker/docker-compose.yml11
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml
index 659bee2979..b8f9741f05 100644
--- a/contrib/docker/docker-compose.yml
+++ b/contrib/docker/docker-compose.yml
@@ -6,13 +6,18 @@ version: '3'
 services:
 
   synapse:
-    image: matrix/synapse
+    image: synapse
+    # Since snyapse 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
     environment:
       - SYNAPSE_SERVER_NAME=my.matrix.host
-      - SYNAPSE_DB_PASSWORD=changeme
+      - SYNAPSE_ENABLE_REGISTRATION=yes
     volumes:
       - ./files:/data
+    depends_on:
+      - db
     # One may either expose ports directly
     ports:
       - 8448:8448/tcp
@@ -29,4 +34,4 @@ services:
       - POSTGRES_USER=matrix
       - POSTGRES_PASSWORD=changeme
     volumes:
-      - ./schemas:/var/lib/postgres
+      - ./schemas:/var/lib/postgresql/data