diff --git a/scripts/build.sh b/scripts/build.sh index 2a53a40..e0832fa 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -8,6 +8,9 @@ source ./scripts/env.sh ./.env.schema base_or_head="$1" rev="$2" +docker compose kill "$base_or_head" +docker compose rm -vsf "$base_or_head" + if [[ "$base_or_head" = "head" ]]; then port=5433 else @@ -49,6 +52,3 @@ docker compose up -d "$base_or_head" isready initdb || (docker compose logs "$base_or_head" && exit 1) ls ./schema/ | xargs -I{} bash -c "set -e; $(declare -f query_file); query_file \"$(db dnim)\" ./schema/{}" || (docker compose logs "$base_or_head" && exit 1) - -docker compose kill "$base_or_head" -docker compose rm -vsf "$base_or_head"