diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-01-05 13:52:54 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-01-05 13:52:54 +0100 |
| commit | 62749ba74fd82a86a30f2e65b8830724a8e6f445 (patch) | |
| tree | 56d7ebe5896c150debeb8e2b4c1b7455992ddf59 /ci | |
| parent | 83f9bc5e1314c32422d4030763853e76fd56290c (diff) | |
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.
Diffstat (limited to 'ci')
| -rwxr-xr-x | ci/startcompose.sh | 14 |
1 files changed, 10 insertions, 4 deletions
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 |
