summary refs log tree commit diff
path: root/contrib/docker/docker-compose.yml
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/docker/docker-compose.yml')
-rw-r--r--contrib/docker/docker-compose.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml
new file mode 100644
index 0000000000..b8f9741f05
--- /dev/null
+++ b/contrib/docker/docker-compose.yml
@@ -0,0 +1,37 @@
+# This compose file is compatible with Copose itself, it might need some
+# adjustments to run properly with stack.
+
+version: '3'
+
+services:
+
+  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_ENABLE_REGISTRATION=yes
+    volumes:
+      - ./files:/data
+    depends_on:
+      - db
+    # One may either expose ports directly
+    ports:
+      - 8448:8448/tcp
+    # ... or use a reverse proxy, here is an example for traefik
+    labels:
+      - traefik.enable=true
+      - traefik.frontend.rule=Host:my.matrix.Host
+      - traefik.port=8448
+
+  db:
+    image: postgres:latest
+    # Change that password, of course!
+    environment:
+      - POSTGRES_USER=matrix
+      - POSTGRES_PASSWORD=changeme
+    volumes:
+      - ./schemas:/var/lib/postgresql/data