Skip to content

Commit

Permalink
Adjust placement of --remove-orphans docker compose option
Browse files Browse the repository at this point in the history
  • Loading branch information
justinclift committed Oct 3, 2024
1 parent 2837282 commit 808d5b6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test_run() {
fi

# Shut down any containers that are still running
docker compose -f docker-compose-pgauto.yml down
docker compose -f docker-compose-pgauto.yml down --remove-orphans

##
## Tests for one shot mode
Expand All @@ -63,11 +63,10 @@ test_run() {
sudo rm -rf postgres-data

# Create the PostgreSQL database using a specific version of PostgreSQL
docker compose -f "docker-compose-pg${VERSION}.yml" run --rm --remove-orphans server create_db
docker compose -f "docker-compose-pg${VERSION}.yml" run --rm server create_db

# Run the PostgreSQL container in one shot mode
TARGET_TAG="${TARGET}-${FLAVOR}" docker compose -f docker-compose-pgauto.yml run --rm --remove-orphans \
-e PGAUTO_ONESHOT=yes postgres
TARGET_TAG="${TARGET}-${FLAVOR}" docker compose -f docker-compose-pgauto.yml run --rm -e PGAUTO_ONESHOT=yes postgres

# Verify the PostgreSQL data files are now the target version
PGVER=$(sudo cat postgres-data/PG_VERSION)
Expand Down

0 comments on commit 808d5b6

Please sign in to comment.