Conservation des volumes entre les installations et ajout de vérification de l'existance du homeserver.yaml avant créationwq
This commit is contained in:
parent
c9719d91ca
commit
a3baf43f75
|
@ -16,10 +16,12 @@ fi
|
||||||
if [[ ! -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then
|
if [[ ! -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then
|
||||||
podman volume create matrixdotorg_synapse-pgsql
|
podman volume create matrixdotorg_synapse-pgsql
|
||||||
fi
|
fi
|
||||||
|
if [[ ! -d `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data`/homeserver.yam ]]; then
|
||||||
podman run -it --name ${container_name}-generate --mount type=volume,src=matrixdotorg_synapse-data,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=matrixdotorg_synapse-data,dst=/data -e SYNAPSE_SERVER_NAME=garbaye.fr -e SYNAPSE_REPORT_STATS=no ${synapse_image}:${synapse_version} generate && \
|
||||||
podman rm ${container_name}-generate && \
|
podman rm ${container_name}-generate
|
||||||
|
fi
|
||||||
podman unshare sed -i -e 's|^#public_baseurl: https://example.com/$|public_baseurl: ${GARBAYE_MATRIX_URL}|g' `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data`/homeserver.yaml && \
|
podman unshare sed -i -e 's|^#public_baseurl: https://example.com/$|public_baseurl: ${GARBAYE_MATRIX_URL}|g' `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data`/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 }}' matrixdotorg_synapse-data`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 }}' matrixdotorg_synapse-data`/homeserver.yaml && \
|
||||||
podman unshare sed -i -e 's|^#enable_registration: false$|enable_registration: false|g' `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data`homeserver.yaml" && \
|
podman unshare sed -i -e 's|^#enable_registration: false$|enable_registration: false|g' `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data`/homeserver.yaml" && \
|
||||||
${ABSDIR}/10_install.sh
|
${ABSDIR}/10_install.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue