Skip to content

Commit

Permalink
Merge branch 'master' into feature/use-gpg-public-key-encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
mykolasolodukha committed Nov 9, 2024
2 parents 5171614 + 081ab67 commit da56f1b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM postgres:16.2
FROM postgres:17.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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 17.0](https://hub.docker.com/_/postgres/).

## Requirements

Expand Down
8 changes: 8 additions & 0 deletions docs/create.md
Original file line number Diff line number Diff line change
@@ -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"
```
2 changes: 1 addition & 1 deletion functions
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion plugin.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[plugin]
description = "dokku postgres service plugin"
version = "1.36.4"
version = "1.39.0"
[plugin.config]
8 changes: 4 additions & 4 deletions tests/link_networks.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/shellcheck-exclude
Original file line number Diff line number Diff line change
@@ -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 - <https://github.com/koalaman/shellcheck/wiki/SC1091>
# 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
Expand Down

0 comments on commit da56f1b

Please sign in to comment.