Conservation des volumes entre les installations
This commit is contained in:
parent
d685123615
commit
c9719d91ca
|
@ -9,17 +9,13 @@ ensure_not_root
|
||||||
|
|
||||||
ensure_variables_are_defined "$envvars"
|
ensure_variables_are_defined "$envvars"
|
||||||
|
|
||||||
if [[ -d ~/.local/share/containers/storage/volumes/${confvolume} ]]; then
|
if [[ ! -d ~/.local/share/containers/storage/volumes/${confvolume} ]]; then
|
||||||
echo "Error : conf volume ${confvolume} already exists. Please remove it first (prune?)."
|
podman volume create matrixdotorg_synapse-data
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then
|
if [[ ! -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then
|
||||||
echo "Error : db volume ${dbvolume} already exists. Please remove it first (prune?)."
|
podman volume create matrixdotorg_synapse-pgsql
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
podman volume create matrixdotorg_synapse-data && \
|
|
||||||
podman volume create matrixdotorg_synapse-pgsql && \
|
|
||||||
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 && \
|
||||||
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 && \
|
||||||
|
|
|
@ -18,8 +18,8 @@ ensure_systemd_unit_not_exists ${service_name}
|
||||||
|
|
||||||
# remove volume
|
# remove volume
|
||||||
#podman unshare rm -rf ~/${confvolume}/
|
#podman unshare rm -rf ~/${confvolume}/
|
||||||
podman volume rm matrixdotorg_synapse-data
|
#podman volume rm matrixdotorg_synapse-data
|
||||||
podman volume rm matrixdotorg_synapse-pgsql
|
#podman volume rm matrixdotorg_synapse-pgsql
|
||||||
|
|
||||||
# remove images
|
# remove images
|
||||||
#for image in ${upstream_images} ; do
|
#for image in ${upstream_images} ; do
|
||||||
|
|
Loading…
Reference in a new issue