diff --git a/podman-matrix/10_install.sh b/podman-matrix/10_install.sh index 3d9ad22..7247aaf 100755 --- a/podman-matrix/10_install.sh +++ b/podman-matrix/10_install.sh @@ -23,8 +23,8 @@ fi podman image pull ${synapse_image}:${synapse_version} && podman image exists ${synapse_image}:${synapse_version} && podman pull ${postgres_image}:${postgres_version} && -podman pod create --publish ${listen_if}:${listen_port}:8008 --name ${pod_name} && -podman run -d --name ${db_container_name} --pod ${pod_name} \ +podman pod create --publish ${listen_if}:${listen_port}:8008 --name ${pod_name} --infra=true --infra-name=${project_name}_infra --share='' && +podman run -d --name ${db_container_name} --pod ${pod_name} --requires=${project_name}_infra \ --mount type=volume,src=${dbvolume},dst=/var/lib/postgresql/data/ \ -e POSTGRES_PASSWORD=${GARBAYE_MATRIX_POSTGRES_PASSWORD} \ -e POSTGRES_USER=${container_name} \ @@ -34,8 +34,7 @@ podman run -d --name ${db_container_name} --pod ${pod_name} \ echo -n "Waiting for PostgreSQL to be ready... " && ( podman logs -f synapse-db 2>&1 & ) | grep -q 'database system is ready to accept connections' && echo "OK." && -podman run -d --name ${container_name} --pod ${pod_name} \ - --add-host ${db_container_name}:127.0.0.1 \ +podman run -d --name ${container_name} --pod ${pod_name} --requires=${project_name}_infra \ --mount type=volume,src=${confvolume},dst=/data ${synapse_image}:${synapse_version} && echo -n "Waiting for background tasks to end... " && ( podman logs -f synapse 2>&1 & ) | grep -q 'No more background updates to do' && diff --git a/podman-matrix/vars.sh b/podman-matrix/vars.sh index af40028..6279c35 100644 --- a/podman-matrix/vars.sh +++ b/podman-matrix/vars.sh @@ -13,7 +13,7 @@ GARBAYE_MATRIX_URL="${GARBAYE_MATRIX_URL:-https://matrix.garbaye.fr}" envvars='GARBAYE_MATRIX_POSTGRES_PASSWORD GARBAYE_MATRIX_DOMAIN GARBAYE_MATRIX_URL' ## internal vars : do not touch project_name=${PWD##*/} -pod_name="${project_name}" +pod_name="pod_${project_name}" service_name="pod-${pod_name}.service" upstream_images="${synapse_image} ${postgres_image}" confvolume='matrixdotorg_synapse-data'