Skip to content

Commit

Permalink
Merge pull request #142 from ava-labs/gstuart/docker-compose-abort-on…
Browse files Browse the repository at this point in the history
…-container-exit

Set all containers to exit if one exits early
  • Loading branch information
geoff-vball authored Nov 20, 2023
2 parents 8c08753 + 5c37598 commit e035112
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/local/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ setARCH

if [ -z "$LOCAL_RELAYER_IMAGE" ]; then
echo "Using published awm-relayer image"
docker compose -f docker/docker-compose-run.yml --project-directory ./ up --build &
docker compose -f docker/docker-compose-run.yml --project-directory ./ up --abort-on-container-exit --build &
else
echo "Using local awm-relayer image: $LOCAL_RELAYER_IMAGE"
if [[ "$(docker images -q awm-relayer:$LOCAL_RELAYER_IMAGE 2> /dev/null)" == "" ]]; then
Expand All @@ -57,7 +57,7 @@ else
fi
rm -f docker/docker-compose-run-local.yml
sed "s/<TAG>/$LOCAL_RELAYER_IMAGE/g" docker/docker-compose-run-local-template.yml > docker/docker-compose-run-local.yml
docker compose -f docker/docker-compose-run-local.yml --project-directory ./ up --build &
docker compose -f docker/docker-compose-run-local.yml --project-directory ./ up --abort-on-container-exit --build &
fi

tail -f /dev/null
4 changes: 2 additions & 2 deletions scripts/local/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ setARCH

if [ -z "$LOCAL_RELAYER_IMAGE" ]; then
echo "Using published awm-relayer image"
docker compose -f docker/docker-compose-test.yml --project-directory ./ up --build &
docker compose -f docker/docker-compose-test.yml --project-directory ./ up --abort-on-container-exit --build &
dockerPid=$!
else
echo "Using local awm-relayer image: $LOCAL_RELAYER_IMAGE"
Expand All @@ -62,7 +62,7 @@ else
fi
rm -f docker/docker-compose-test-local.yml
sed "s/<TAG>/$LOCAL_RELAYER_IMAGE/g" docker/docker-compose-test-local-template.yml > docker/docker-compose-test-local.yml
docker compose -f docker/docker-compose-test-local.yml --project-directory ./ up --build &
docker compose -f docker/docker-compose-test-local.yml --project-directory ./ up --abort-on-container-exit --build &
dockerPid=$!
fi

Expand Down

0 comments on commit e035112

Please sign in to comment.