Skip to content

Commit

Permalink
Change from docker-compose to docker compose for newer docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dmannarino committed Aug 5, 2024
1 parent cc13aae commit b37e43d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions scripts/delete_workspace
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters

docker-compose -f terraform/docker/docker-compose.yml build
docker-compose -f terraform/docker/docker-compose.yml run --entrypoint delete_workspace --rm terraform "$@" -var="git_sha=${GIT_SHA}"
docker compose -f terraform/docker/docker-compose.yml build
docker compose -f terraform/docker/docker-compose.yml run --entrypoint delete_workspace --rm terraform "$@" -var="git_sha=${GIT_SHA}"
4 changes: 2 additions & 2 deletions scripts/develop
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [ "${BUILD}" = true ]; then
docker build -t batch_postgresql-client_test . -f batch/postgresql-client.dockerfile
docker build -t batch_tile_cache_test . -f batch/tile_cache.dockerfile
docker build -t pixetl_test . -f batch/pixetl.dockerfile
docker-compose -f docker-compose.dev.yml --project-name gfw-data-api_dev up --abort-on-container-exit --remove-orphans --build
docker compose -f docker-compose.dev.yml --project-name gfw-data-api_dev up --abort-on-container-exit --remove-orphans --build
else
docker-compose -f docker-compose.dev.yml --project-name gfw-data-api_dev up --abort-on-container-exit --remove-orphans
docker compose -f docker-compose.dev.yml --project-name gfw-data-api_dev up --abort-on-container-exit --remove-orphans
fi
4 changes: 2 additions & 2 deletions scripts/infra
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -e

GIT_SHA=$(git rev-parse HEAD)

docker-compose -f terraform/docker/docker-compose.yml build
docker-compose -f terraform/docker/docker-compose.yml run --rm terraform "$@" -var="git_sha=${GIT_SHA}"
docker compose -f terraform/docker/docker-compose.yml build
docker compose -f terraform/docker/docker-compose.yml run --rm terraform "$@" -var="git_sha=${GIT_SHA}"
4 changes: 2 additions & 2 deletions scripts/migrate
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

docker-compose -f docker-compose.dev.yml build app
docker-compose -f docker-compose.dev.yml --project-name gfw-data-api_dev run --rm --entrypoint alembic app revision --autogenerate
docker compose -f docker-compose.dev.yml build app
docker compose -f docker-compose.dev.yml --project-name gfw-data-api_dev run --rm --entrypoint alembic app revision --autogenerate

git add app/models/orm/migrations/versions
4 changes: 2 additions & 2 deletions scripts/migration_dry_run
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

set -e

docker-compose -f docker-compose.dev.yml build app
docker-compose -f docker-compose.dev.yml --project-name gfw-data-api_dev run --rm --entrypoint alembic app -x dry-run upgrade head
docker compose -f docker-compose.dev.yml build app
docker compose -f docker-compose.dev.yml --project-name gfw-data-api_dev run --rm --entrypoint alembic app -x dry-run upgrade head
2 changes: 1 addition & 1 deletion scripts/terraform
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e

docker-compose -f terraform/docker/docker-compose.yml run --rm --entrypoint terraform --workdir /usr/local/src/terraform terraform "$@"
docker compose -f terraform/docker/docker-compose.yml run --rm --entrypoint terraform --workdir /usr/local/src/terraform terraform "$@"
6 changes: 3 additions & 3 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ if [ "${BUILD}" = true ]; then
docker build -t batch_postgresql-client_test . -f batch/postgresql-client.dockerfile
docker build -t batch_tile_cache_test . -f batch/tile_cache.dockerfile
docker build -t pixetl_test . -f batch/pixetl.dockerfile
docker-compose -f docker-compose.test.yml --project-name gfw-data-api_test build --no-cache app_test
docker compose -f docker-compose.test.yml --project-name gfw-data-api_test build --no-cache app_test
fi

set +e

# Everything from "--cov-report on" become the arguments to the pytest run inside the docker.
docker-compose -f docker-compose.test.yml --project-name gfw-data-api_test run --rm --name app_test app_test --cov-report xml:/app/tests/cobertura.xml $HANGING $SLOW $DO_COV $DISABLE_WARNINGS $SHOW_STDOUT $args
docker compose -f docker-compose.test.yml --project-name gfw-data-api_test run --rm --name app_test app_test --cov-report xml:/app/tests/cobertura.xml $HANGING $SLOW $DO_COV $DISABLE_WARNINGS $SHOW_STDOUT $args
exit_code=$?
docker-compose -f docker-compose.test.yml --project-name gfw-data-api_test down --remove-orphans
docker compose -f docker-compose.test.yml --project-name gfw-data-api_test down --remove-orphans
exit $exit_code
6 changes: 3 additions & 3 deletions scripts/test_v2
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ if [ "${BUILD}" = true ]; then
docker build -t batch_postgresql-client_test . -f batch/postgresql-client.dockerfile
docker build -t batch_tile_cache_test . -f batch/tile_cache.dockerfile
docker build -t pixetl_test . -f batch/pixetl.dockerfile
docker-compose -f docker-compose.test.yml --project-name gfw-data-api_test build --no-cache app_test
docker compose -f docker-compose.test.yml --project-name gfw-data-api_test build --no-cache app_test
fi

set +e

# Everything from "--cov-report on" become the arguments to the pytest run inside the docker.
docker-compose -f docker-compose.test.yml --project-name gfw-data-api_test run --rm --name app_test app_test --cov-report xml:/app/tests_v2/cobertura.xml $DO_COV $DISABLE_WARNINGS $SHOW_STDOUT $args
docker compose -f docker-compose.test.yml --project-name gfw-data-api_test run --rm --name app_test app_test --cov-report xml:/app/tests_v2/cobertura.xml $DO_COV $DISABLE_WARNINGS $SHOW_STDOUT $args
exit_code=$?
docker-compose -f docker-compose.test.yml --project-name gfw-data-api_test down --remove-orphans
docker compose -f docker-compose.test.yml --project-name gfw-data-api_test down --remove-orphans
exit $exit_code

0 comments on commit b37e43d

Please sign in to comment.