From 582217687066ed78e9736573900be070c58e17df Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 29 Jun 2024 03:25:41 -0400 Subject: [PATCH 01/10] fix: use .DNSNames instead of .Aliases in tests Docker has changed their output in an unclear manner, but this is the correct way to check for what dns records are available for usage by apps. --- tests/link_networks.bats | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/link_networks.bats b/tests/link_networks.bats index f75dfbe..3d37638 100755 --- a/tests/link_networks.bats +++ b/tests/link_networks.bats @@ -48,7 +48,7 @@ teardown() { assert_output_contains bridge 0 assert_output_contains custom-network - run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' + run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' echo "output: $output" echo "status: $status" assert_success @@ -120,7 +120,7 @@ teardown() { assert_output_contains custom-network assert_output_contains bridge - run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' + run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' echo "output: $output" echo "status: $status" assert_success @@ -192,7 +192,7 @@ teardown() { assert_output_contains bridge assert_output_contains custom-network - run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' + run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' echo "output: $output" echo "status: $status" assert_success @@ -258,7 +258,7 @@ teardown() { assert_output_contains bridge assert_output_contains custom-network - run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.lsa -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' + run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.lsa -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}' echo "output: $output" echo "status: $status" assert_success From 7bca464cd6b7b2d70a1e13d08079d3df03de6229 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 29 Jun 2024 03:44:46 -0400 Subject: [PATCH 02/10] tests: exclude SC1091 from shellcheck rules --- tests/shellcheck-exclude | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/shellcheck-exclude b/tests/shellcheck-exclude index 9a160cf..9fbac74 100644 --- a/tests/shellcheck-exclude +++ b/tests/shellcheck-exclude @@ -1,4 +1,5 @@ # SC1090 - Can't follow non-constant source. Use a directive to specify location - https://github.com/koalaman/shellcheck/wiki/SC1090 +# SC1091 - Not following - # SC2034 - Variable appears unused. Verify it or export it - https://github.com/koalaman/shellcheck/wiki/SC2034 # SC2155 - Declare and assign separately to avoid masking return values - https://github.com/koalaman/shellcheck/wiki/SC2155 # SC2206 - Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a - https://github.com/koalaman/shellcheck/wiki/SC2206 From f4698b1e5f0508a3aabde536addd85eeb0a0c37f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Jun 2024 07:51:38 +0000 Subject: [PATCH 03/10] chore(deps): bump postgres from 16.2 to 16.3 Bumps postgres from 16.2 to 16.3. --- updated-dependencies: - dependency-name: postgres dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 58e5c1b..de4fdaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1 @@ -FROM postgres:16.2 +FROM postgres:16.3 From e9fad4784279fbce24cb069958e9ff88f575ce81 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 30 Jun 2024 13:47:39 -0400 Subject: [PATCH 04/10] Release 1.37.0 --- plugin.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.toml b/plugin.toml index 1c9b51c..b0fb2bd 100644 --- a/plugin.toml +++ b/plugin.toml @@ -1,4 +1,4 @@ [plugin] description = "dokku postgres service plugin" -version = "1.36.4" +version = "1.37.0" [plugin.config] From 864b50891bae4b0b12cd8750d29beaeb33127543 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 02:38:43 +0000 Subject: [PATCH 05/10] chore(deps): bump postgres from 16.3 to 16.4 Bumps postgres from 16.3 to 16.4. --- updated-dependencies: - dependency-name: postgres dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index de4fdaf..30c6d90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1 @@ -FROM postgres:16.3 +FROM postgres:16.4 From 81ff14518d5911c3e225355b7710bbf6824c7e95 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 10 Aug 2024 18:39:42 -0400 Subject: [PATCH 06/10] Release 1.38.0 --- README.md | 2 +- plugin.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 679d9e3..de33ce5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # dokku postgres [![Build Status](https://img.shields.io/github/actions/workflow/status/dokku/dokku-postgres/ci.yml?branch=master&style=flat-square "Build Status")](https://github.com/dokku/dokku-postgres/actions/workflows/ci.yml?query=branch%3Amaster) [![IRC Network](https://img.shields.io/badge/irc-libera-blue.svg?style=flat-square "IRC Libera")](https://webchat.libera.chat/?channels=dokku) -Official postgres plugin for dokku. Currently defaults to installing [postgres 16.2](https://hub.docker.com/_/postgres/). +Official postgres plugin for dokku. Currently defaults to installing [postgres 16.4](https://hub.docker.com/_/postgres/). ## Requirements diff --git a/plugin.toml b/plugin.toml index b0fb2bd..c0ac27f 100644 --- a/plugin.toml +++ b/plugin.toml @@ -1,4 +1,4 @@ [plugin] description = "dokku postgres service plugin" -version = "1.37.0" +version = "1.38.0" [plugin.config] From 6577443afbcfaa19fce6c60dfb343023738a0774 Mon Sep 17 00:00:00 2001 From: Komlan KEDJI Date: Tue, 24 Sep 2024 10:06:47 +0000 Subject: [PATCH 07/10] fix: set ON_ERROR_STOP=1 for psql, so calling scripts get an exit status Currently, using `postgres:connect` with a script passed in through stdin, there is no way to know if the script failed or not. This change aligns the behavior with https://github.com/docker-library/postgres/blob/eaa1c35769621a6bb1e499073a5812ba478c7688/docker-entrypoint.sh#L196 which returns an exit status. --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions b/functions index a09b4c8..9442d72 100755 --- a/functions +++ b/functions @@ -18,7 +18,7 @@ service_connect() { local SERVICE_TTY_OPTS has_tty && SERVICE_TTY_OPTS="-t" - "$DOCKER_BIN" container exec --env=LANG=C.UTF-8 --env=LC_ALL=C.UTF-8 -i $SERVICE_TTY_OPTS "$SERVICE_NAME" psql -h localhost -U postgres "$DATABASE_NAME" + "$DOCKER_BIN" container exec --env=LANG=C.UTF-8 --env=LC_ALL=C.UTF-8 -i $SERVICE_TTY_OPTS "$SERVICE_NAME" psql -v ON_ERROR_STOP=1 -h localhost -U postgres "$DATABASE_NAME" } service_create() { From f3a2c3cbbc4ab86e2ab647de76e4cb687024a40c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 02:57:12 +0000 Subject: [PATCH 08/10] chore(deps): bump postgres from 16.4 to 17.0 Bumps postgres from 16.4 to 17.0. --- updated-dependencies: - dependency-name: postgres dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 30c6d90..5a670ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1 @@ -FROM postgres:16.4 +FROM postgres:17.0 From b18d0838b9daab2bb225a653e466fee6a0dc3c48 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 29 Sep 2024 00:47:10 -0400 Subject: [PATCH 09/10] Release 1.39.0 --- README.md | 2 +- plugin.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de33ce5..1d53c6b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # dokku postgres [![Build Status](https://img.shields.io/github/actions/workflow/status/dokku/dokku-postgres/ci.yml?branch=master&style=flat-square "Build Status")](https://github.com/dokku/dokku-postgres/actions/workflows/ci.yml?query=branch%3Amaster) [![IRC Network](https://img.shields.io/badge/irc-libera-blue.svg?style=flat-square "IRC Libera")](https://webchat.libera.chat/?channels=dokku) -Official postgres plugin for dokku. Currently defaults to installing [postgres 16.4](https://hub.docker.com/_/postgres/). +Official postgres plugin for dokku. Currently defaults to installing [postgres 17.0](https://hub.docker.com/_/postgres/). ## Requirements diff --git a/plugin.toml b/plugin.toml index c0ac27f..1e51937 100644 --- a/plugin.toml +++ b/plugin.toml @@ -1,4 +1,4 @@ [plugin] description = "dokku postgres service plugin" -version = "1.38.0" +version = "1.39.0" [plugin.config] From 61f0d78a932c93eb933dc29742f176c2b321d978 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 3 Nov 2024 14:25:25 -0500 Subject: [PATCH 10/10] docs: document pgvector usage Closes #305 --- docs/create.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/create.md b/docs/create.md index 1d70706..a81f148 100644 --- a/docs/create.md +++ b/docs/create.md @@ -1,5 +1,13 @@ Official Postgres "$DOCKER_BIN" image ls does not include postgis extension (amongst others). The following example creates a new postgres service using `postgis/postgis:13-3.1` image, which includes the `postgis` extension. ```shell +# use the appropriate image-version for your use-case dokku postgres:create postgis-database --image "postgis/postgis" --image-version "13-3.1" ``` + +To use pgvector instead, run the following: + +```shell +# use the appropriate image-version for your use-case +dokku postgres:create pgvector-database --image "pgvector/pgvector" --image-version "pg17" +```