summary refs log tree commit diff
diff options
context:
space:
mode:
authorkaiyou <pierre@jaury.eu>2018-02-04 12:55:20 +0100
committerkaiyou <pierre@jaury.eu>2018-02-04 12:55:20 +0100
commit1ba2fe114c79dd0f2f2fb8868f8cb0a9f5893652 (patch)
tree94e0fe01ad20b5e6d897794b1c4e48165a5b763f
parentInstall the postgres dependencies (diff)
downloadsynapse-1ba2fe114c79dd0f2f2fb8868f8cb0a9f5893652.tar.xz
Provide an example docker compose file
Diffstat (limited to '')
-rw-r--r--Dockerfile2
-rw-r--r--contrib/docker/docker-compose.yml32
2 files changed, 34 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index 881c25c243..25f3746303 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,4 +14,6 @@ RUN cd /synapse \
 
 VOLUME ["/data"]
 
+EXPOSE 8448
+
 ENTRYPOINT ["/start.py"]
diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml
new file mode 100644
index 0000000000..659bee2979
--- /dev/null
+++ b/contrib/docker/docker-compose.yml
@@ -0,0 +1,32 @@
+# This compose file is compatible with Copose itself, it might need some
+# adjustments to run properly with stack.
+
+version: '3'
+
+services:
+
+  synapse:
+    image: matrix/synapse
+    # See the readme for a full documentation of the environment settings
+    environment:
+      - SYNAPSE_SERVER_NAME=my.matrix.host
+      - SYNAPSE_DB_PASSWORD=changeme
+    volumes:
+      - ./files:/data
+    # 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/postgres