synapse.. 10_install
This commit is contained in:
parent
c47deeeb6b
commit
ef10a6ed93
|
@ -43,20 +43,22 @@ podman-compose --pod-args="--infra=true --infra-name=${project_name}_infra --sha
|
|||
end=$((SECONDS+120))
|
||||
while [ $SECONDS -lt $end ]; do
|
||||
sleep 1
|
||||
if check_container_running synapse; then
|
||||
podman logs synapse 2>&1 | grep -qe 'Preparing for databases' &&
|
||||
if check_container_running ${container_name}; then
|
||||
podman logs ${container_name} 2>&1 | grep -qe 'Preparing for databases' &&
|
||||
break
|
||||
else
|
||||
podman logs synapse 2>&1 | grep -qe 'psycopg2.OperationalError: could not connect to server: Connection refused' &&
|
||||
podman healthcheck run synapse-db &&
|
||||
podman logs ${container_name} 2>&1 | grep -qe 'psycopg2.OperationalError: could not connect to server: Connection refused' &&
|
||||
podman healthcheck run ${db_container_name} &&
|
||||
echo "Oops, synapse didn't wait for PostgreSQL, restarting"
|
||||
podman start synapse
|
||||
podman start ${container_name}
|
||||
fi
|
||||
done &&
|
||||
|
||||
podman container wait --condition=running ${container_name} &&
|
||||
echo -n "Waiting for background tasks to end... " &&
|
||||
( podman container logs --tail=10 -f ${container_name} 2>&1 & ) | grep -q 'No more background updates to do' &&
|
||||
echo "OK." &&
|
||||
( podman container logs --tail=50 -f ${container_name} 2>&1 & ) | grep -q 'No more background updates to do' &&
|
||||
echo "OK." || retval=false
|
||||
podman pod stop ${pod_name} &&
|
||||
echo "Done. Pod built and stopped."
|
||||
echo "Done. Pod stopped."
|
||||
shred -u .env
|
||||
eval "$retval"
|
||||
|
|
Loading…
Reference in a new issue