fix podman-compose + python (1/x)

This commit is contained in:
Gitouche 2024-06-11 21:51:25 +02:00
parent e7f321f9e9
commit 2edbc75d93
3 changed files with 16 additions and 2 deletions

View file

@ -350,3 +350,17 @@ oci_push_to_registry () {
fi
fi
}
my_podman_compose () {
podman_compose_path=$(which podman-compose)
if [[ ! -z ${podman_compose_path} ]]; then
for py in python3.9 python3.6; do
${py} ${podman_compose_path} --version 2>/dev/null 1>&2
if [[ $? -eq 0 ]]; then
"${py} ${podman_compose_path} ${@}"
break
fi
done
fi
}

View file

@ -38,7 +38,7 @@ if ! podman image exists ${framadate_image}:${framadate_version}; then
fi
podman image pull ${mysql_image}:${mysql_version} &&
python3.9 podman-compose --pod-args="--infra=true --infra-name=${project_name}_infra --share=" --podman-run-args "--requires=${project_name}_infra --env-file .env" up -d &&
my_podman_compose --pod-args="--infra=true --infra-name=${project_name}_infra --share=" --podman-run-args "--requires=${project_name}_infra --env-file .env" up -d &&
echo -n "Waiting for initialization to end... " &&
( podman container logs -f framadate-app 2>&1 & ) | grep -q 'configured -- resuming normal operations' &&
echo "OK" &&

View file

@ -57,7 +57,7 @@ fi
podman image pull ${postgres_image}:${postgres_version} &&
# force refresh of app.ini
podman unshare rm -f `get_podman_volume_path ${datavolume}`/gitea/conf/app.ini
python3.9 podman-compose --pod-args="--infra=true --infra-name=${project_name}_infra --share=" --podman-run-args "--requires=${project_name}_infra --env-file .env" up -d &&
my_podman_compose --pod-args="--infra=true --infra-name=${project_name}_infra --share=" --podman-run-args "--requires=${project_name}_infra --env-file .env" up -d &&
echo -n "Waiting for gitea to finish starting " &&
( podman container logs -f ${container_name} 2>&1 & ) | grep -q 'NewServer()' &&
echo "OK" &&