Skip to content

Commit

Permalink
Rename compose.yml, remove deprecated syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth committed Feb 8, 2025
1 parent b1567a8 commit 9d9029f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
test-app/
test.docker-compose.yml
test.compose.yml
test.dockerfile
2 changes: 0 additions & 2 deletions example/docker-compose.yml → example/compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
app:
build:
Expand Down
16 changes: 8 additions & 8 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ for version in "${meteor_versions[@]}"; do
SECONDS=0

rm -f test.dockerfile
rm -f test.docker-compose.yml
rm -f test.compose.yml
rm -rf test-app

dockerfile='default.dockerfile'
Expand All @@ -50,16 +50,16 @@ for version in "${meteor_versions[@]}"; do

do_sed "s|/app|/test-app|g" test.dockerfile

cp docker-compose.yml test.docker-compose.yml
do_sed 's|dockerfile: Dockerfile|dockerfile: test.dockerfile|' test.docker-compose.yml
cp compose.yml test.compose.yml
do_sed 's|dockerfile: Dockerfile|dockerfile: test.dockerfile|' test.compose.yml

echo 'Building test app Docker image...'
run_with_suppressed_output 'docker compose --file test.docker-compose.yml build'
run_with_suppressed_output 'docker compose --file test.compose.yml build'

echo 'Launching test app...'
run_with_suppressed_output 'docker compose --file test.docker-compose.yml up --detach'
run_with_suppressed_output 'docker compose --file test.compose.yml up --detach'

# Poll until docker-compose network ready, timing out after 20 seconds
# Poll until docker compose network ready, timing out after 20 seconds
for i in {1..20}; do
(curl --silent --fail http://localhost/ | grep __meteor_runtime_config__) > /dev/null 2>&1 && break || {
if [ "$i" -lt 21 ]; then
Expand Down Expand Up @@ -96,11 +96,11 @@ for version in "${meteor_versions[@]}"; do
fi

if [ "${SKIP_CLEANUP:-}" != 1 ]; then
run_with_suppressed_output 'docker compose --file test.docker-compose.yml down'
run_with_suppressed_output 'docker compose --file test.compose.yml down'
run_with_suppressed_output 'docker rmi example-app:latest'

rm -f test.dockerfile
rm -f test.docker-compose.yml
rm -f test.compose.yml
rm -rf test-app
fi
done
Expand Down

0 comments on commit 9d9029f

Please sign in to comment.