Compare commits

...

47 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
d602498d4f Release 1.42.1
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-03-09 07:12:03 -04:00
Jose Diaz-Gonzalez
15fa64e838 Merge pull request #339 from dokku/7470-name-argument
docs: ensure --name flag is used in installation docs
2025-03-09 06:05:40 -05:00
Jose Diaz-Gonzalez
cd7e66c454 docs: ensure --name flag is used in installation docs
Closes dokku/dokku#7470
2025-03-09 07:04:00 -04:00
Jose Diaz-Gonzalez
91b0a4ad00 Release 1.42.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-02-21 22:16:36 -05:00
Jose Diaz-Gonzalez
e1f721f39b Merge pull request #337 from dokku/dependabot/docker/postgres-17.3
chore(deps): bump postgres from 17.2 to 17.3
2025-02-21 21:16:25 -06:00
dependabot[bot]
2f816534da chore(deps): bump postgres from 17.2 to 17.3
Bumps postgres from 17.2 to 17.3.

---
updated-dependencies:
- dependency-name: postgres
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-14 02:44:02 +00:00
Jose Diaz-Gonzalez
9ab50f6feb Release 1.41.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-11-24 22:19:06 -05:00
Jose Diaz-Gonzalez
d8b3273161 Merge pull request #333 from dokku/dependabot/docker/postgres-17.2
chore(deps): bump postgres from 17.1 to 17.2
2024-11-24 22:01:00 -05:00
dependabot[bot]
d1da450dc9 chore(deps): bump postgres from 17.1 to 17.2
Bumps postgres from 17.1 to 17.2.

---
updated-dependencies:
- dependency-name: postgres
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 02:37:19 +00:00
Jose Diaz-Gonzalez
0ed012a16b Merge pull request #332 from dokku/enable-image-overrides
feat: enable env overrides for support images and update all to latest
2024-11-24 19:57:44 -05:00
Jose Diaz-Gonzalez
ef356c56de feat: enable env overrides for support images and update all to latest 2024-11-24 19:15:23 -05:00
Jose Diaz-Gonzalez
2021cb23da Merge pull request #330 from indrat/enable-image-overrides
feat: enable env overrides for support images
2024-11-24 19:10:04 -05:00
Jose Diaz-Gonzalez
e844659f8f Merge branch 'master' into enable-image-overrides 2024-11-24 19:09:57 -05:00
Jose Diaz-Gonzalez
88ad80c096 Merge pull request #317 from mykolasolodukha/feature/use-gpg-public-key-encryption
 Implement GPG Public Key encryption support
2024-11-24 19:08:43 -05:00
Jose Diaz-Gonzalez
ba3d81cd20 Release 1.40.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-11-24 18:51:52 -05:00
Jose Diaz-Gonzalez
0c625d5e71 Merge pull request #331 from dokku/dependabot/docker/postgres-17.1
chore(deps): bump postgres from 17.0 to 17.1
2024-11-24 18:51:42 -05:00
dependabot[bot]
b787d66665 chore(deps): bump postgres from 17.0 to 17.1
Bumps postgres from 17.0 to 17.1.

---
updated-dependencies:
- dependency-name: postgres
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 02:16:57 +00:00
indra
627ebb5ab6 feat: enable env overrides for support images
allows for support images to be pulled from alternative or private
registries.
2024-11-12 19:26:20 +11:00
Mykola Solodukha
da56f1b26e Merge branch 'master' into feature/use-gpg-public-key-encryption 2024-11-09 15:17:41 +02:00
Jose Diaz-Gonzalez
081ab67c14 Merge pull request #329 from dokku/josegonzalez-patch-1
Document pgvector usage
2024-11-03 14:25:34 -05:00
Jose Diaz-Gonzalez
61f0d78a93 docs: document pgvector usage
Closes #305
2024-11-03 14:25:25 -05:00
Jose Diaz-Gonzalez
b18d0838b9 Release 1.39.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-09-29 00:47:10 -04:00
Jose Diaz-Gonzalez
bb9829883b Merge pull request #327 from dokku/dependabot/docker/postgres-17.0
chore(deps): bump postgres from 16.4 to 17.0
2024-09-29 00:47:00 -04:00
dependabot[bot]
f3a2c3cbbc 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] <support@github.com>
2024-09-27 02:57:12 +00:00
Jose Diaz-Gonzalez
29057e00a2 Merge pull request #325 from erickedji/patch-1
fix: set ON_ERROR_STOP=1 for psql, so calling scripts get an exit status
2024-09-24 12:36:33 -04:00
Komlan KEDJI
6577443afb 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 eaa1c35769/docker-entrypoint.sh (L196) which returns an exit status.
2024-09-24 10:06:47 +00:00
Jose Diaz-Gonzalez
81ff14518d Release 1.38.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-08-10 18:39:42 -04:00
Jose Diaz-Gonzalez
14f670c7c4 Merge pull request #323 from dokku/dependabot/docker/postgres-16.4
chore(deps): bump postgres from 16.3 to 16.4
2024-08-10 18:39:24 -04:00
dependabot[bot]
864b50891b 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] <support@github.com>
2024-08-09 02:38:43 +00:00
Jose Diaz-Gonzalez
e9fad47842 Release 1.37.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-06-30 13:47:39 -04:00
Jose Diaz-Gonzalez
9258d77b12 Merge pull request #318 from dokku/dependabot/docker/postgres-16.3
chore(deps): bump postgres from 16.2 to 16.3
2024-06-30 13:47:31 -04:00
dependabot[bot]
f4698b1e5f 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] <support@github.com>
2024-06-29 07:51:38 +00:00
Jose Diaz-Gonzalez
f07d950cd9 Merge pull request #320 from dokku/exclude-SC1091
tests: exclude SC1091 from shellcheck rules
2024-06-29 03:49:00 -04:00
Jose Diaz-Gonzalez
7bca464cd6 tests: exclude SC1091 from shellcheck rules 2024-06-29 03:44:58 -04:00
Jose Diaz-Gonzalez
d40e7c7619 Merge pull request #319 from dokku/fix-tests
fix: use .DNSNames instead of .Aliases in tests
2024-06-29 03:41:06 -04:00
Jose Diaz-Gonzalez
5822176870 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.
2024-06-29 03:25:41 -04:00
Mykola Solodukha
5171614175 🚑 Use the correct version of dokku/s3backup image 2024-06-10 01:32:01 +03:00
Mykola Solodukha
1077c49a15 🚑 Correct the function name 2024-06-10 00:21:51 +03:00
Mykola Solodukha
50a7923695 Implement GPG Public Key encryption support
First introduced in https://github.com/dokku/docker-s3backup/pull/81.
2024-04-28 18:23:40 +03:00
Jose Diaz-Gonzalez
13e46bafcf Release 1.36.4
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-03-06 02:09:58 -05:00
Jose Diaz-Gonzalez
10fa2ebd35 Merge pull request #313 from dokku/dependabot/docker/postgres-16.2
chore(deps): bump postgres from 16.1 to 16.2
2024-03-06 02:09:48 -05:00
dependabot[bot]
151176e142 chore(deps): bump postgres from 16.1 to 16.2
Bumps postgres from 16.1 to 16.2.

---
updated-dependencies:
- dependency-name: postgres
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-13 02:11:05 +00:00
Jose Diaz-Gonzalez
1110b7a560 Release 1.36.3
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-01-29 10:10:07 -05:00
Jose Diaz-Gonzalez
e907c8c218 fix: use correct repository on arm64 ubuntu image 2024-01-29 10:09:17 -05:00
Jose Diaz-Gonzalez
09a7cb820b Release 1.36.2
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-01-29 10:07:05 -05:00
Jose Diaz-Gonzalez
d6976a5290 Merge pull request #312 from dokku/dependabot/github_actions/actions/upload-artifact-4
chore(deps): bump actions/upload-artifact from 3 to 4
2023-12-19 00:25:07 -05:00
dependabot[bot]
453e4993b9 chore(deps): bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 03:02:33 +00:00
14 changed files with 140 additions and 17 deletions

View File

@@ -51,7 +51,7 @@ jobs:
- run: make test - run: make test
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: tmp/test-results name: tmp/test-results
@@ -93,7 +93,7 @@ jobs:
- run: make test - run: make test
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: tmp/test-results name: tmp/test-results

View File

@@ -1 +1 @@
FROM postgres:16.1 FROM postgres:17.3

View File

@@ -1,5 +1,6 @@
HARDWARE = $(shell uname -m) HARDWARE = $(shell uname -m)
SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]') SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]')
ARCH = $(shell dpkg --print-architecture)
SHFMT_VERSION = 3.0.2 SHFMT_VERSION = 3.0.2
XUNIT_TO_GITHUB_VERSION = 0.3.0 XUNIT_TO_GITHUB_VERSION = 0.3.0
XUNIT_READER_VERSION = 0.1.0 XUNIT_READER_VERSION = 0.1.0
@@ -20,8 +21,12 @@ shellcheck:
ifneq ($(shell shellcheck --version >/dev/null 2>&1 ; echo $$?),0) ifneq ($(shell shellcheck --version >/dev/null 2>&1 ; echo $$?),0)
ifeq ($(SYSTEM_NAME),darwin) ifeq ($(SYSTEM_NAME),darwin)
brew install shellcheck brew install shellcheck
else
ifeq ($(ARCH),arm64)
sudo add-apt-repository 'deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse'
else else
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse' sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse'
endif
sudo rm -rf /var/lib/apt/lists/* && sudo apt-get clean sudo rm -rf /var/lib/apt/lists/* && sudo apt-get clean
sudo apt-get update -qq && sudo apt-get install -qq -y shellcheck sudo apt-get update -qq && sudo apt-get install -qq -y shellcheck
endif endif

View File

@@ -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) # 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.1](https://hub.docker.com/_/postgres/). Official postgres plugin for dokku. Currently defaults to installing [postgres 17.3](https://hub.docker.com/_/postgres/).
## Requirements ## Requirements
@@ -11,7 +11,7 @@ Official postgres plugin for dokku. Currently defaults to installing [postgres 1
```shell ```shell
# on 0.19.x+ # on 0.19.x+
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git --name postgres
``` ```
## Commands ## Commands
@@ -24,8 +24,10 @@ postgres:backup-deauth <service> # remove backup authenticatio
postgres:backup-schedule <service> <schedule> <bucket-name> [--use-iam] # schedule a backup of the postgres service postgres:backup-schedule <service> <schedule> <bucket-name> [--use-iam] # schedule a backup of the postgres service
postgres:backup-schedule-cat <service> # cat the contents of the configured backup cronfile for the service postgres:backup-schedule-cat <service> # cat the contents of the configured backup cronfile for the service
postgres:backup-set-encryption <service> <passphrase> # set encryption for all future backups of postgres service postgres:backup-set-encryption <service> <passphrase> # set encryption for all future backups of postgres service
postgres:backup-set-public-key-encryption <service> <public-key-id> # set GPG Public Key encryption for all future backups of postgres service
postgres:backup-unschedule <service> # unschedule the backup of the postgres service postgres:backup-unschedule <service> # unschedule the backup of the postgres service
postgres:backup-unset-encryption <service> # unset encryption for future backups of the postgres service postgres:backup-unset-encryption <service> # unset encryption for future backups of the postgres service
postgres:backup-unset-public-key-encryption <service> # unset GPG Public Key encryption for future backups of the postgres service
postgres:clone <service> <new-service> [--clone-flags...] # create container <new-name> then copy data from <name> into <new-name> postgres:clone <service> <new-service> [--clone-flags...] # create container <new-name> then copy data from <name> into <new-name>
postgres:connect <service> # connect to the service via the postgres connection tool postgres:connect <service> # connect to the service via the postgres connection tool
postgres:create <service> [--create-flags...] # create a postgres service postgres:create <service> [--create-flags...] # create a postgres service
@@ -103,9 +105,17 @@ dokku postgres:create lollipop
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. 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 ```shell
# use the appropriate image-version for your use-case
dokku postgres:create postgis-database --image "postgis/postgis" --image-version "13-3.1" 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"
```
### print the service information ### print the service information
```shell ```shell
@@ -718,6 +728,19 @@ Set the GPG-compatible passphrase for encrypting backups for backups:
dokku postgres:backup-set-encryption lollipop dokku postgres:backup-set-encryption lollipop
``` ```
### set GPG Public Key encryption for all future backups of postgres service
```shell
# usage
dokku postgres:backup-set-public-key-encryption <service> <public-key-id>
```
Set the `GPG` Public Key for encrypting backups:
```shell
dokku postgres:backup-set-public-key-encryption lollipop
```
### unset encryption for future backups of the postgres service ### unset encryption for future backups of the postgres service
```shell ```shell
@@ -731,6 +754,19 @@ Unset the `GPG` encryption passphrase for backups:
dokku postgres:backup-unset-encryption lollipop dokku postgres:backup-unset-encryption lollipop
``` ```
### unset GPG Public Key encryption for future backups of the postgres service
```shell
# usage
dokku postgres:backup-unset-public-key-encryption <service>
```
Unset the `GPG` Public Key encryption for backups:
```shell
dokku postgres:backup-unset-public-key-encryption lollipop
```
### schedule a backup of the postgres service ### schedule a backup of the postgres service
```shell ```shell

View File

@@ -110,7 +110,7 @@ def installation_section(service, dokku_version):
"", "",
"```shell", "```shell",
f"# on {dokku_version}", f"# on {dokku_version}",
f"sudo dokku plugin:install https://github.com/dokku/dokku-{service}.git {service}", f"sudo dokku plugin:install https://github.com/dokku/dokku-{service}.git --name {service}",
"```", "```",
] ]
) )
@@ -290,7 +290,9 @@ def usage_backup(
"backup-deauth", "backup-deauth",
"backup", "backup",
"backup-set-encryption", "backup-set-encryption",
"backup-set-public-key-encryption",
"backup-unset-encryption", "backup-unset-encryption",
"backup-unset-public-key-encryption",
"backup-schedule", "backup-schedule",
"backup-schedule-cat", "backup-schedule-cat",
"backup-unschedule", "backup-unschedule",

View File

@@ -308,6 +308,10 @@ service_backup() {
BACKUP_PARAMETERS="$BACKUP_PARAMETERS -e ENCRYPTION_KEY=$(cat "$BACKUP_ENCRYPTION_CONFIG_ROOT/ENCRYPTION_KEY")" BACKUP_PARAMETERS="$BACKUP_PARAMETERS -e ENCRYPTION_KEY=$(cat "$BACKUP_ENCRYPTION_CONFIG_ROOT/ENCRYPTION_KEY")"
fi fi
if [[ -f "$BACKUP_ENCRYPTION_CONFIG_ROOT/ENCRYPT_WITH_PUBLIC_KEY_ID" ]]; then
BACKUP_PARAMETERS="$BACKUP_PARAMETERS -e ENCRYPT_WITH_PUBLIC_KEY_ID=$(cat "$BACKUP_ENCRYPTION_CONFIG_ROOT/ENCRYPT_WITH_PUBLIC_KEY_ID")"
fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
"$DOCKER_BIN" container run --rm $BACKUP_PARAMETERS "$PLUGIN_S3BACKUP_IMAGE" "$DOCKER_BIN" container run --rm $BACKUP_PARAMETERS "$PLUGIN_S3BACKUP_IMAGE"
} }
@@ -433,6 +437,16 @@ service_backup_set_encryption() {
echo "$ENCRYPTION_KEY" >"${SERVICE_BACKUP_ENCRYPTION_ROOT}/ENCRYPTION_KEY" echo "$ENCRYPTION_KEY" >"${SERVICE_BACKUP_ENCRYPTION_ROOT}/ENCRYPTION_KEY"
} }
service_backup_set_public_key_encryption() {
declare desc="set up backup GPG Public Key encryption"
declare SERVICE="$1" ENCRYPT_WITH_PUBLIC_KEY_ID="$2"
local SERVICE_ROOT="${PLUGIN_DATA_ROOT}/${SERVICE}"
local SERVICE_BACKUP_ENCRYPTION_ROOT="${SERVICE_ROOT}/backup-encryption/"
mkdir "$SERVICE_BACKUP_ENCRYPTION_ROOT"
echo "$ENCRYPT_WITH_PUBLIC_KEY_ID" >"${SERVICE_BACKUP_ENCRYPTION_ROOT}/ENCRYPT_WITH_PUBLIC_KEY_ID"
}
service_backup_unschedule() { service_backup_unschedule() {
declare desc="unschedule the backup of the service" declare desc="unschedule the backup of the service"
declare SERVICE="$1" declare SERVICE="$1"
@@ -450,6 +464,15 @@ service_backup_unset_encryption() {
rm -rf "$SERVICE_BACKUP_ENCRYPTION_ROOT" rm -rf "$SERVICE_BACKUP_ENCRYPTION_ROOT"
} }
service_backup_unset_encryption() {
declare desc="remove backup encryption"
declare SERVICE="$1"
local SERVICE_ROOT="${PLUGIN_DATA_ROOT}/${SERVICE}"
local SERVICE_BACKUP_ENCRYPTION_ROOT="${SERVICE_ROOT}/backup-encryption/"
rm -rf "$SERVICE_BACKUP_ENCRYPTION_ROOT"
}
service_container_rm() { service_container_rm() {
declare desc="stop a service and remove the running container" declare desc="stop a service and remove the running container"
declare SERVICE="$1" declare SERVICE="$1"

8
config
View File

@@ -28,9 +28,9 @@ if [[ -n $DOKKU_API_VERSION ]]; then
export PLUGIN_BASE_PATH="$PLUGIN_ENABLED_PATH" export PLUGIN_BASE_PATH="$PLUGIN_ENABLED_PATH"
fi fi
export PLUGIN_BUSYBOX_IMAGE="busybox:1.34.1-uclibc" export PLUGIN_BUSYBOX_IMAGE=${PLUGIN_BUSYBOX_IMAGE:=busybox:1.37.0-uclibc}
export PLUGIN_AMBASSADOR_IMAGE="dokku/ambassador:0.5.0" export PLUGIN_AMBASSADOR_IMAGE=${PLUGIN_AMBASSADOR_IMAGE:=dokku/ambassador:0.8.2}
export PLUGIN_S3BACKUP_IMAGE="dokku/s3backup:0.14.0" export PLUGIN_S3BACKUP_IMAGE=${PLUGIN_S3BACKUP_IMAGE:=dokku/s3backup:0.18.0}
export PLUGIN_WAIT_IMAGE="dokku/wait:0.6.0" export PLUGIN_WAIT_IMAGE=${PLUGIN_WAIT_IMAGE:=dokku/wait:0.9.3}
export POSTGRES_CONFIG_OPTIONS=${POSTGRES_CONFIG_OPTIONS:=""} export POSTGRES_CONFIG_OPTIONS=${POSTGRES_CONFIG_OPTIONS:=""}

View File

@@ -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. 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 ```shell
# use the appropriate image-version for your use-case
dokku postgres:create postgis-database --image "postgis/postgis" --image-version "13-3.1" 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"
```

View File

@@ -18,7 +18,7 @@ service_connect() {
local SERVICE_TTY_OPTS local SERVICE_TTY_OPTS
has_tty && SERVICE_TTY_OPTS="-t" 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() { service_create() {

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku postgres service plugin" description = "dokku postgres service plugin"
version = "1.36.1" version = "1.42.1"
[plugin.config] [plugin.config]

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/config"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"
service-backup-set-public-key-encryption-cmd() {
#E set the GPG Public Key for encrypting backups
#E dokku $PLUGIN_COMMAND_PREFIX:backup-set-public-key-encryption lollipop
#A service, service to run command against
#A public-key-id, a GPG Public Key ID (or fingerprint) to use for encryption. Must be uploaded to the GPG keyserver beforehand.
declare desc="set GPG Public Key encryption for all future backups of $PLUGIN_SERVICE service"
local cmd="$PLUGIN_COMMAND_PREFIX:backup-set-public-key-encryption" argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
declare SERVICE="$1" PUBLIC_KEY_ID="$2"
is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented"
[[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service"
[[ -z "$PUBLIC_KEY_ID" ]] && dokku_log_fail "Please specify a valid GPG Public Key ID (or fingerprint)"
verify_service_name "$SERVICE"
service_backup_set_public_key_encryption "$SERVICE" "$PUBLIC_KEY_ID"
}
service-backup-set-public-key-encryption-cmd "$@"

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/config"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"
service-backup-unset-public-key-encryption-cmd() {
#E unset the GPG Public Key encryption for backups
#E dokku $PLUGIN_COMMAND_PREFIX:backup-unset-public-key-encryption lollipop
#A service, service to run command against
declare desc="unset GPG Public Key encryption for future backups of the $PLUGIN_SERVICE service"
local cmd="$PLUGIN_COMMAND_PREFIX:backup-unset-public-key-encryption" argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
declare SERVICE="$1"
is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" # TODO: [22.03.2024 by Mykola]
[[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service"
verify_service_name "$SERVICE"
service_backup_unset_public_key_encryption "$SERVICE" # TODO: [22.03.2024 by Mykola]
}
service-backup-unset-encryption-cmd "$@"

View File

@@ -48,7 +48,7 @@ teardown() {
assert_output_contains bridge 0 assert_output_contains bridge 0
assert_output_contains custom-network 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 "output: $output"
echo "status: $status" echo "status: $status"
assert_success assert_success
@@ -120,7 +120,7 @@ teardown() {
assert_output_contains custom-network assert_output_contains custom-network
assert_output_contains bridge 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 "output: $output"
echo "status: $status" echo "status: $status"
assert_success assert_success
@@ -192,7 +192,7 @@ teardown() {
assert_output_contains bridge assert_output_contains bridge
assert_output_contains custom-network 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 "output: $output"
echo "status: $status" echo "status: $status"
assert_success assert_success
@@ -258,7 +258,7 @@ teardown() {
assert_output_contains bridge assert_output_contains bridge
assert_output_contains custom-network 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 "output: $output"
echo "status: $status" echo "status: $status"
assert_success assert_success

View File

@@ -1,4 +1,5 @@
# SC1090 - Can't follow non-constant source. Use a directive to specify location - https://github.com/koalaman/shellcheck/wiki/SC1090 # 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 # 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 # 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 # SC2206 - Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a - https://github.com/koalaman/shellcheck/wiki/SC2206