From 62749ba74fd82a86a30f2e65b8830724a8e6f445 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Thu, 5 Jan 2023 13:52:54 +0100 Subject: CI: Support overriding docker-compose with podman-compose Useful if symlinking is not an option due to having docker-compose and podman-compose installed. You can change $PATH just for this repo but that's messy. --- ci/startcompose.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'ci') diff --git a/ci/startcompose.sh b/ci/startcompose.sh index e65fa86..5b44c2d 100755 --- a/ci/startcompose.sh +++ b/ci/startcompose.sh @@ -13,14 +13,20 @@ fi # Get absolute path to current directory this script is in SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -pushd "$SCRIPT_DIR"/.. +pushd "$SCRIPT_DIR"/.. || exit 1 # Create self-signed certificate mkdir -p ci/docker/selfsigned ./ci/docker/createcert.sh + # Up the containers and abort on exit. Also rebuild the necessary steps if there are changes -# You can symlink docker-compose to podman-compose to use Podman -docker-compose up --build --force-recreate --abort-on-container-exit +# You can pass EDUVPN_PODCOMP=1 to use podman-compose instead of docker-compose +compose_cmd="docker-compose" +if [ "$EDUVPN_PODCOMP" ]; then + compose_cmd="podman-compose" +fi + +"$compose_cmd" up --build --force-recreate --abort-on-container-exit -popd +popd || exit 1 -- cgit v1.2.3