summary refs log tree commit diff
path: root/docker/complement/conf
diff options
context:
space:
mode:
authorMathieu Velten <mathieuv@matrix.org>2022-09-14 17:00:09 +0200
committerMathieu Velten <mathieuv@matrix.org>2022-09-14 17:18:35 +0200
commitf2352314925303c34ffee0d6961046eb53eb57d3 (patch)
tree2877ef93a34a791ba990ab785bf9bcb3d60f0141 /docker/complement/conf
parentFix bug in device list caching when remote users leave rooms (#13749) (diff)
downloadsynapse-mv/complement-pg-data.tar.xz
complement: move PG data outside of the container storage github/mv/complement-pg-data mv/complement-pg-data
Signed-off-by: Mathieu Velten <mathieuv@matrix.org>
Diffstat (limited to 'docker/complement/conf')
-rwxr-xr-xdocker/complement/conf/start_for_complement.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/docker/complement/conf/start_for_complement.sh b/docker/complement/conf/start_for_complement.sh

index cc6482f763..4fd12b469e 100755 --- a/docker/complement/conf/start_for_complement.sh +++ b/docker/complement/conf/start_for_complement.sh
@@ -25,8 +25,16 @@ case "$SYNAPSE_COMPLEMENT_DATABASE" in # Set postgres authentication details which will be placed in the homeserver config file export POSTGRES_PASSWORD=somesecret export POSTGRES_USER=postgres + export POSTGRES_HOST=localhost + if [ ! -f "$PGDATA/PG_VERSION" ]; then + gosu postgres initdb --locale=C --encoding=UTF-8 --auth-host password + + echo "ALTER USER postgres PASSWORD 'somesecret'" | gosu postgres postgres --single + echo "CREATE DATABASE synapse" | gosu postgres postgres --single + fi + # configure supervisord to start postgres export START_POSTGRES=true ;;