use alpine containers
Some checks are pending
ci/woodpecker/push/build-amd64 Pipeline is pending
ci/woodpecker/push/build-arm64 Pipeline is pending
ci/woodpecker/push/build-docker Pipeline is pending
ci/woodpecker/push/docs Pipeline is pending
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test Pipeline is pending

This commit is contained in:
Floatingghost 2024-05-29 05:20:20 +01:00
parent 38d93a0f97
commit 995225b783

View file

@ -14,7 +14,7 @@ old_version=$2
new_version=$3
# Start a PostgreSQL 14 container
docker run --rm -d --name pg14 -v $(pwd)/$data_directory:/var/lib/postgresql/data postgres:$old_version
docker run --rm -d --name pg14 -v $(pwd)/$data_directory:/var/lib/postgresql/data postgres:$old_version-alpine
# Dump the db from the old container
docker exec pg14 pg_dumpall -U postgres > dump.sql
@ -26,7 +26,7 @@ docker stop pg14
mv $data_directory $data_directory.bak
# Start a PostgreSQL 16 container
docker run --rm -d --name pg16 -v $(pwd)/$data_directory:/var/lib/postgresql/data postgres:$new_version
docker run --rm -d --name pg16 -v $(pwd)/$data_directory:/var/lib/postgresql/data postgres:$new_version-alpine
# Load the db into the new container
docker exec -i pg16 psql -U postgres < dump.sql