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