Skip to content

Instantly share code, notes, and snippets.

@bouroo
Created October 20, 2024 08:27
Show Gist options
  • Save bouroo/1532bfcc637139b85b269b10692a41a3 to your computer and use it in GitHub Desktop.
Save bouroo/1532bfcc637139b85b269b10692a41a3 to your computer and use it in GitHub Desktop.
pgauto docker script to update postgres database version
#!/usr/bin/env bash
docker run --name pgauto -it \
--mount type=bind,source=${PGDATA},target=/var/lib/postgresql/data \
-e TZ="Asia/Bangkok" \
-e LANG="C.UTF-8" \
-e POSTGRES_USER="${POSTGRES_USER}" \
-e POSTGRES_PASSWORD="${POSTGRES_PASSWORD}" \
-e PGAUTO_ONESHOT=yes \
pgautoupgrade/pgautoupgrade:17-bookworm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment