Add GARBAYE_MATRIX_DOMAIN var

This commit is contained in:
Loïc 2021-07-12 21:40:44 +02:00
parent 065d11bfac
commit 3250849a13
2 changed files with 3 additions and 2 deletions

View file

@ -17,7 +17,7 @@ fi
podman volume create ${confvolume} \
podman volume create ${dbvolume} \
podman run -it --name ${container_name}-generate --mount type=volume,src=${confvolume},dst=/data -e SYNAPSE_SERVER_NAME=garbaye.fr -e SYNAPSE_REPORT_STATS=no ${synapse_image}:${synapse_version} generate && \
podman run -it --name ${container_name}-generate --mount type=volume,src=${confvolume},dst=/data -e SYNAPSE_SERVER_NAME=${GARBAYE_MATRIX_DOMAIN} -e SYNAPSE_REPORT_STATS=no ${synapse_image}:${synapse_version} generate && \
podman rm ${container_name}-generate \
podman unshare sed -i -e "s|^#public_baseurl: https://example.com/$|public_baseurl: ${GARBAYE_MATRIX_URL}|g" `podman volume inspect --format '{{ .Mountpoint }}' ${confvolume}`/homeserver.yaml && \
podman unshare sed -z -i -e "s|database:\n name: sqlite3\n args:\n database: /data/homeserver.db|database:\n name: psycopg2\n args:\n user: synapse\n password: ${GARBAYE_MATRIX_POSTGRES_PASSWORD}\n database: synapse\n host: synapse-db\n port: 5432\n cp_min: 5\n cp_max: 10|g" `podman volume inspect --format '{{ .Mountpoint }}' ${confvolume}`/homeserver.yaml && \

View file

@ -12,5 +12,6 @@ confvolume='matrixdotorg_synapse-data'
dbvolume='matrixdotorg_synapse-pgsql'
container_name='synapse'
db_container_name='synapse-db'
GARBAYE_MATRIX_DOMAIN="${GARBAYE_MATRIX_DOMAIN:-garbaye.fr}"
GARBAYE_MATRIX_URL="${GARBAYE_MATRIX_URL:-https://matrix.garbaye.fr}"
envvars='GARBAYE_MATRIX_POSTGRES_PASSWORD GARBAYE_MATRIX_URL'
envvars='GARBAYE_MATRIX_POSTGRES_PASSWORD GARBAYE_MATRIX_DOMAIN GARBAYE_MATRIX_URL'