summary refs log tree commit diff
path: root/contrib
diff options
context:
space:
mode:
authorkaiyou <pierre@jaury.eu>2018-02-04 12:20:29 +0100
committerkaiyou <pierre@jaury.eu>2018-02-04 12:20:29 +0100
commit886c2d50197bb3558168ce45b6975777780c7aad (patch)
tree8c35fbdec15f9b733a0b492ff008592d1aa599b6 /contrib
parentGenerate shared secrets if not defined in the environment (diff)
downloadsynapse-886c2d50197bb3558168ce45b6975777780c7aad.tar.xz
Support an external postgresql config in the Docker image
Diffstat (limited to 'contrib')
-rw-r--r--contrib/docker/conf/homeserver.yaml13
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/docker/conf/homeserver.yaml b/contrib/docker/conf/homeserver.yaml
index 851c389c19..1a685320c0 100644
--- a/contrib/docker/conf/homeserver.yaml
+++ b/contrib/docker/conf/homeserver.yaml
@@ -46,8 +46,17 @@ listeners:
 
 ## Database ##
 
-{% if SYNAPSE_DB_HOST %}
-
+{% if SYNAPSE_DB_PASSWORD %}
+database:
+  name: "psycopg2"
+  args:
+    user: "{{ SYNAPSE_DB_USER or "matrix" }}"
+    password: "{{ SYNAPSE_DB_PASSWORD }}"
+    database: "{{ SYNAPSE_DB_DATABASE or "matrix" }}"
+    host: "{{ SYNAPSE_DB_HOST or "db" }}"
+    port: "{{ SYNAPSE_DB_PORT or "5432" }}"
+    cp_min: 5
+    cp_max: 10
 {% else %}
 database:
   name: "sqlite3"