summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/16985.misc1
-rw-r--r--docker/complement/conf/postgres.supervisord.conf2
-rwxr-xr-xdocker/complement/conf/start_for_complement.sh5
3 files changed, 5 insertions, 3 deletions
diff --git a/changelog.d/16985.misc b/changelog.d/16985.misc
new file mode 100644
index 0000000000..34d1337a28
--- /dev/null
+++ b/changelog.d/16985.misc
@@ -0,0 +1 @@
+Allow containers building on top of Synapse's Complement container is use the included PostgreSQL cluster.
diff --git a/docker/complement/conf/postgres.supervisord.conf b/docker/complement/conf/postgres.supervisord.conf
index b88bfc772e..657845dfdb 100644
--- a/docker/complement/conf/postgres.supervisord.conf
+++ b/docker/complement/conf/postgres.supervisord.conf
@@ -1,7 +1,7 @@
 [program:postgres]
 command=/usr/local/bin/prefix-log gosu postgres postgres
 
-# Only start if START_POSTGRES=1
+# Only start if START_POSTGRES=true
 autostart=%(ENV_START_POSTGRES)s
 
 # Lower priority number = starts first
diff --git a/docker/complement/conf/start_for_complement.sh b/docker/complement/conf/start_for_complement.sh
index 7b012ce8ab..cc798a3210 100755
--- a/docker/complement/conf/start_for_complement.sh
+++ b/docker/complement/conf/start_for_complement.sh
@@ -32,8 +32,9 @@ case "$SYNAPSE_COMPLEMENT_DATABASE" in
     ;;
 
   sqlite|"")
-    # Configure supervisord not to start Postgres, as we don't need it
-    export START_POSTGRES=false
+    # Set START_POSTGRES to false unless it has already been set
+    # (i.e. by another container image inheriting our own).
+    export START_POSTGRES=${START_POSTGRES:-false}
     ;;
 
   *)