From 7d0144b0de2ce7d585057ba1338b9227aad5b23b Mon Sep 17 00:00:00 2001 From: bfren Date: Wed, 7 Feb 2024 16:48:46 +0000 Subject: [PATCH 1/5] Bumping version to 3.1.6 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 97ceee1..8a4b275 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.5 \ No newline at end of file +3.1.6 \ No newline at end of file From eea37ad90d638caa1c326687ac30b11a7dbf17ee Mon Sep 17 00:00:00 2001 From: bfren Date: Wed, 7 Feb 2024 16:48:52 +0000 Subject: [PATCH 2/5] Supporting new globbing --- overlay/etc/nu/scripts/bf-postgresql/dump.nu | 4 ++-- overlay/etc/nu/scripts/bf-postgresql/restore.nu | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/overlay/etc/nu/scripts/bf-postgresql/dump.nu b/overlay/etc/nu/scripts/bf-postgresql/dump.nu index 6aa6723..d661338 100644 --- a/overlay/etc/nu/scripts/bf-postgresql/dump.nu +++ b/overlay/etc/nu/scripts/bf-postgresql/dump.nu @@ -37,11 +37,11 @@ export def main [] { # move files to backup directory bf write debug $" .. moving files to ($backup_dir)" dump - mv $"($temp_dir)/*" $backup_dir + echo $"($temp_dir)/*" | mv $in $backup_dir # delete temporary directory bf write debug $" .. deleting ($temp_dir)" dump - rm -rf $temp_dir + bf del force $temp_dir # cleanup old backup files bf write debug " .. removing expired backup files" dump diff --git a/overlay/etc/nu/scripts/bf-postgresql/restore.nu b/overlay/etc/nu/scripts/bf-postgresql/restore.nu index 0b9ae7e..5c3b1a0 100644 --- a/overlay/etc/nu/scripts/bf-postgresql/restore.nu +++ b/overlay/etc/nu/scripts/bf-postgresql/restore.nu @@ -28,7 +28,7 @@ export def main [] { # delete data files let data = bf env PG_DATA bf write debug " .. deleting data files" restore - rm -rf $"($data)/*" + bf del force $"($data)/*" # restart the PostgreSQL service bf write debug " .. reinitialising cluster" restore @@ -46,7 +46,7 @@ export def main [] { # unset restoring variable and delete dump file bf env unset $restoring - rm -f $dump_file.path + bf del force $dump_file.path # if we get here there have been no errors bf write ok "Done." restore From 470b0ed978e25290fc0bb52cf033607136d58316 Mon Sep 17 00:00:00 2001 From: bfren Date: Wed, 7 Feb 2024 16:49:02 +0000 Subject: [PATCH 3/5] Adding /backup volume to README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b69517e..5eff4a0 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ See [For Backups](#for-backups) for configuration variables. | Volume | Purpose | | --------- | ------------------------------------------------------------------------------------------------- | -| `/data` | Data files. | | `/backup` | Backup files (also used for export / import scripts - see [helper functions](#helper-functions)). | +| `/data` | Data files. | ## Environment Variables @@ -51,8 +51,8 @@ See [For Backups](#for-backups) for configuration variables. | --------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- | --------- | | `BF_PG_APPLICATION` | string | Application name - will be used as `BF_PG_DATABASE`, `BF_PG_PASSWORD` and `BF_PG_USERNAME` if they are not set. | *None* | | `BF_PG_DATABASE` | string | Database name(s) - multiple databases can be separated by a comma. | *None* | -| `BF_PG_PASSWORD` | string | Application password. | *None* | -| `BF_PG_USERNAME` | string | Application username. | *None* | +| `BF_PG_PASSWORD` | string | Application password - required if `BF_PG_APPLICATION` is not | *None* | +| `BF_PG_USERNAME` | string | Application username - required if `BF_PG_APPLICATION` is not used. | *None* | ## Helper Functions From c1f65400246997e369a999d5dcec9b9c23ffa2d6 Mon Sep 17 00:00:00 2001 From: bfren Date: Thu, 15 Feb 2024 08:32:14 +0000 Subject: [PATCH 4/5] Using latest base images --- 12/Dockerfile | 2 +- 13/Dockerfile | 2 +- 14/Dockerfile | 2 +- 15/Dockerfile | 2 +- 16/Dockerfile | 2 +- generate-dockerfiles.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/12/Dockerfile b/12/Dockerfile index a75165b..4adb6ee 100644 --- a/12/Dockerfile +++ b/12/Dockerfile @@ -1,4 +1,4 @@ -FROM bfren/alpine-s6:alpine3.18-5.1.3 +FROM bfren/alpine-s6:alpine3.18-5.1.4 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/13/Dockerfile b/13/Dockerfile index b97df9b..770f4c0 100644 --- a/13/Dockerfile +++ b/13/Dockerfile @@ -1,4 +1,4 @@ -FROM bfren/alpine-s6:alpine3.19-5.1.3 +FROM bfren/alpine-s6:alpine3.19-5.1.4 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/14/Dockerfile b/14/Dockerfile index 27207f1..1d4a9d3 100644 --- a/14/Dockerfile +++ b/14/Dockerfile @@ -1,4 +1,4 @@ -FROM bfren/alpine-s6:alpine3.19-5.1.3 +FROM bfren/alpine-s6:alpine3.19-5.1.4 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/15/Dockerfile b/15/Dockerfile index 3014821..98e43a1 100644 --- a/15/Dockerfile +++ b/15/Dockerfile @@ -1,4 +1,4 @@ -FROM bfren/alpine-s6:alpine3.19-5.1.3 +FROM bfren/alpine-s6:alpine3.19-5.1.4 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/16/Dockerfile b/16/Dockerfile index aecd852..e4ba53b 100644 --- a/16/Dockerfile +++ b/16/Dockerfile @@ -1,4 +1,4 @@ -FROM bfren/alpine-s6:alpine3.19-5.1.3 +FROM bfren/alpine-s6:alpine3.19-5.1.4 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/generate-dockerfiles.sh b/generate-dockerfiles.sh index 19e5250..6fbdf72 100755 --- a/generate-dockerfiles.sh +++ b/generate-dockerfiles.sh @@ -4,7 +4,7 @@ set -euo pipefail docker pull bfren/alpine -BASE_VERSION="5.1.3" +BASE_VERSION="5.1.4" echo "Base: ${BASE_VERSION}" POSTGRESQL_VERSIONS="12 13 14 15 16" From 8945388677241653b4f4fd43dae2d9b336691802 Mon Sep 17 00:00:00 2001 From: bfren Date: Thu, 15 Feb 2024 08:33:28 +0000 Subject: [PATCH 5/5] Updating to PostgreSQL 12.18, 13.14, 14.11, 15.6 and 16.2 --- 12/overlay/tmp/POSTGRESQL_BUILD | 2 +- 12/overlay/tmp/POSTGRESQL_MINOR | 2 +- 13/overlay/tmp/POSTGRESQL_BUILD | 2 +- 13/overlay/tmp/POSTGRESQL_MINOR | 2 +- 14/overlay/tmp/POSTGRESQL_BUILD | 2 +- 14/overlay/tmp/POSTGRESQL_MINOR | 2 +- 15/overlay/tmp/POSTGRESQL_BUILD | 2 +- 15/overlay/tmp/POSTGRESQL_MINOR | 2 +- 16/overlay/tmp/POSTGRESQL_BUILD | 2 +- 16/overlay/tmp/POSTGRESQL_MINOR | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/12/overlay/tmp/POSTGRESQL_BUILD b/12/overlay/tmp/POSTGRESQL_BUILD index 59321dc..1f6f3e1 100644 --- a/12/overlay/tmp/POSTGRESQL_BUILD +++ b/12/overlay/tmp/POSTGRESQL_BUILD @@ -1 +1 @@ -12.17-r0 \ No newline at end of file +12.18-r0 \ No newline at end of file diff --git a/12/overlay/tmp/POSTGRESQL_MINOR b/12/overlay/tmp/POSTGRESQL_MINOR index 339dacb..a66526b 100644 --- a/12/overlay/tmp/POSTGRESQL_MINOR +++ b/12/overlay/tmp/POSTGRESQL_MINOR @@ -1 +1 @@ -12.17 \ No newline at end of file +12.18 \ No newline at end of file diff --git a/13/overlay/tmp/POSTGRESQL_BUILD b/13/overlay/tmp/POSTGRESQL_BUILD index 8b980ab..e70cdfc 100644 --- a/13/overlay/tmp/POSTGRESQL_BUILD +++ b/13/overlay/tmp/POSTGRESQL_BUILD @@ -1 +1 @@ -13.13-r0 \ No newline at end of file +13.14-r0 \ No newline at end of file diff --git a/13/overlay/tmp/POSTGRESQL_MINOR b/13/overlay/tmp/POSTGRESQL_MINOR index 1f8009c..9aba6b7 100644 --- a/13/overlay/tmp/POSTGRESQL_MINOR +++ b/13/overlay/tmp/POSTGRESQL_MINOR @@ -1 +1 @@ -13.13 \ No newline at end of file +13.14 \ No newline at end of file diff --git a/14/overlay/tmp/POSTGRESQL_BUILD b/14/overlay/tmp/POSTGRESQL_BUILD index 595925a..f2a0a92 100644 --- a/14/overlay/tmp/POSTGRESQL_BUILD +++ b/14/overlay/tmp/POSTGRESQL_BUILD @@ -1 +1 @@ -14.10-r0 \ No newline at end of file +14.11-r0 \ No newline at end of file diff --git a/14/overlay/tmp/POSTGRESQL_MINOR b/14/overlay/tmp/POSTGRESQL_MINOR index d3a61db..eab8122 100644 --- a/14/overlay/tmp/POSTGRESQL_MINOR +++ b/14/overlay/tmp/POSTGRESQL_MINOR @@ -1 +1 @@ -14.10 \ No newline at end of file +14.11 \ No newline at end of file diff --git a/15/overlay/tmp/POSTGRESQL_BUILD b/15/overlay/tmp/POSTGRESQL_BUILD index bbab991..4645332 100644 --- a/15/overlay/tmp/POSTGRESQL_BUILD +++ b/15/overlay/tmp/POSTGRESQL_BUILD @@ -1 +1 @@ -15.5-r0 \ No newline at end of file +15.6-r0 \ No newline at end of file diff --git a/15/overlay/tmp/POSTGRESQL_MINOR b/15/overlay/tmp/POSTGRESQL_MINOR index 474b680..8a62774 100644 --- a/15/overlay/tmp/POSTGRESQL_MINOR +++ b/15/overlay/tmp/POSTGRESQL_MINOR @@ -1 +1 @@ -15.5 \ No newline at end of file +15.6 \ No newline at end of file diff --git a/16/overlay/tmp/POSTGRESQL_BUILD b/16/overlay/tmp/POSTGRESQL_BUILD index cfbd4db..369ab15 100644 --- a/16/overlay/tmp/POSTGRESQL_BUILD +++ b/16/overlay/tmp/POSTGRESQL_BUILD @@ -1 +1 @@ -16.1-r0 \ No newline at end of file +16.2-r0 \ No newline at end of file diff --git a/16/overlay/tmp/POSTGRESQL_MINOR b/16/overlay/tmp/POSTGRESQL_MINOR index 67eb807..d9ad0e5 100644 --- a/16/overlay/tmp/POSTGRESQL_MINOR +++ b/16/overlay/tmp/POSTGRESQL_MINOR @@ -1 +1 @@ -16.1 \ No newline at end of file +16.2 \ No newline at end of file