Compare commits

...

62 Commits

Author SHA1 Message Date
30901bae7a 更新 Dockerfile
Some checks failed
CI / unit-tests (push) Has been cancelled
CI / unit-tests-0.19.0 (push) Has been cancelled
2025-10-17 00:40:48 +08:00
flowshadow
aa633b064a 修改镜像地址
Some checks failed
CI / unit-tests (push) Has been cancelled
CI / unit-tests-0.19.0 (push) Has been cancelled
2025-10-17 00:13:03 +08:00
Jose Diaz-Gonzalez
5e78804e8d Merge pull request #362 from dokku/dependabot/github_actions/softprops/action-gh-release-2.4.1
Some checks failed
CI / unit-tests (push) Has been cancelled
CI / unit-tests-0.19.0 (push) Has been cancelled
chore(deps): bump softprops/action-gh-release from 2.4.0 to 2.4.1
2025-10-13 00:03:54 -04:00
dependabot[bot]
2bdbcaaa13 chore(deps): bump softprops/action-gh-release from 2.4.0 to 2.4.1
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.4.0...v2.4.1)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 02:07:04 +00:00
Jose Diaz-Gonzalez
8900767980 Merge pull request #361 from dokku/dependabot/github_actions/softprops/action-gh-release-2.4.0
chore(deps): bump softprops/action-gh-release from 2.3.4 to 2.4.0
2025-10-12 17:21:36 -04:00
dependabot[bot]
fc341f3e16 chore(deps): bump softprops/action-gh-release from 2.3.4 to 2.4.0
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.3.4 to 2.4.0.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.3.4...v2.4.0)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-08 02:05:38 +00:00
Jose Diaz-Gonzalez
25680c9a50 Merge pull request #360 from dokku/dependabot/github_actions/softprops/action-gh-release-2.3.4
chore(deps): bump softprops/action-gh-release from 2.3.3 to 2.3.4
2025-10-07 14:06:29 -04:00
dependabot[bot]
81c5a2c8de chore(deps): bump softprops/action-gh-release from 2.3.3 to 2.3.4
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.3.3 to 2.3.4.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.3.3...v2.3.4)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.3.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 02:05:41 +00:00
Jose Diaz-Gonzalez
2f403e9405 Merge pull request #356 from dokku/dependabot/github_actions/softprops/action-gh-release-2.3.3
chore(deps): bump softprops/action-gh-release from 2.3.2 to 2.3.3
2025-09-08 15:04:36 -04:00
dependabot[bot]
e53fe3fe7f chore(deps): bump softprops/action-gh-release from 2.3.2 to 2.3.3
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.3.2...v2.3.3)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.3.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 02:05:32 +00:00
Jose Diaz-Gonzalez
eacca0adf2 Merge pull request #355 from dokku/dependabot/github_actions/actions/setup-python-6
chore(deps): bump actions/setup-python from 5 to 6
2025-09-04 22:37:45 -04:00
dependabot[bot]
03d2fc592b chore(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-05 02:06:02 +00:00
Jose Diaz-Gonzalez
34cee3536e Merge pull request #351 from dokku/dependabot/github_actions/actions/checkout-5
chore(deps): bump actions/checkout from 4 to 5
2025-08-12 11:36:22 -04:00
dependabot[bot]
cd50f19b81 chore(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 11:46:39 +00:00
Jose Diaz-Gonzalez
15054f742d Merge pull request #349 from dokku/dependabot/github_actions/softprops/action-gh-release-2.3.2
chore(deps): bump softprops/action-gh-release from 2.2.2 to 2.3.2
2025-06-10 23:58:33 -04:00
dependabot[bot]
314b0bdc1f chore(deps): bump softprops/action-gh-release from 2.2.2 to 2.3.2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.2.2 to 2.3.2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.2.2...v2.3.2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.3.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-11 03:05:33 +00:00
Jose Diaz-Gonzalez
17b76038a3 Release 1.44.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-05-22 00:32:37 -04:00
Jose Diaz-Gonzalez
8adce1f206 Merge pull request #346 from dokku/dependabot/docker/postgres-17.5
chore(deps): bump postgres from 17.4 to 17.5
2025-05-22 00:32:27 -04:00
dependabot[bot]
7e54c6be64 chore(deps): bump postgres from 17.4 to 17.5
Bumps postgres from 17.4 to 17.5.

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-09 02:53:12 +00:00
Jose Diaz-Gonzalez
c728a443c2 Release 1.43.1
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-04-28 23:56:54 -04:00
Jose Diaz-Gonzalez
fe6afbb51b Merge pull request #345 from dokku/fix-typo
docs: fix typo in generated docs
2025-04-28 23:42:55 -04:00
Jose Diaz-Gonzalez
945e43cb65 docs: regenerate readme 2025-04-28 23:41:15 -04:00
Jose Diaz-Gonzalez
936fcb5931 docs: correct typo in generated readme 2025-04-28 23:07:50 -04:00
Jose Diaz-Gonzalez
e59116d69e Merge pull request #344 from dokku/dependabot/github_actions/softprops/action-gh-release-2.2.2
chore(deps): bump softprops/action-gh-release from 2.2.1 to 2.2.2
2025-04-28 23:04:06 -04:00
dependabot[bot]
4376ad269d chore(deps): bump softprops/action-gh-release from 2.2.1 to 2.2.2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-21 02:53:47 +00:00
Jose Diaz-Gonzalez
674ba8b8c9 Merge pull request #343 from dokku/update-workflows
chore: bump runs-on image from ubuntu-22.04 to ubuntu-24.04
2025-04-17 21:11:21 -04:00
Jose Diaz-Gonzalez
d11614bd50 fix: use maintained version of python 2025-04-17 20:48:25 -04:00
Jose Diaz-Gonzalez
5925f9c4d4 chore: bump runs-on image from ubuntu-22.04 to ubuntu-24.04 2025-04-17 20:40:44 -04:00
Jose Diaz-Gonzalez
507526b01c Merge pull request #340 from dokku/maintained-action
ci: use maintained action for creating automated releases
2025-03-13 18:51:15 -05:00
Jose Diaz-Gonzalez
81771f0e2c ci: use maintained action for creating automated releases 2025-03-13 19:46:51 -04:00
Jose Diaz-Gonzalez
451c9aea70 Release 1.43.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-03-12 20:49:53 -04:00
Jose Diaz-Gonzalez
e82d66a56b Merge pull request #338 from dokku/dependabot/docker/postgres-17.4
chore(deps): bump postgres from 17.3 to 17.4
2025-03-12 19:49:37 -05:00
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
dependabot[bot]
f7fc11192d chore(deps): bump postgres from 17.3 to 17.4
Bumps postgres from 17.3 to 17.4.

---
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-24 02:35:01 +00: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
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
14 changed files with 145 additions and 27 deletions

View File

@@ -5,7 +5,7 @@ name: CI
on: on:
pull_request: pull_request:
branches: branches:
- '*' - "*"
push: push:
branches: branches:
- master - master
@@ -17,18 +17,18 @@ concurrency:
jobs: jobs:
unit-tests-master: unit-tests-master:
name: unit-tests name: unit-tests
runs-on: ubuntu-22.04 runs-on: ubuntu-24.04
env: env:
DOKKU_VERSION: master DOKKU_VERSION: master
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-python@v5 - uses: actions/setup-python@v6
with: with:
python-version: '3.7.x' python-version: "3.13"
- run: make setup - run: make setup
@@ -59,18 +59,18 @@ jobs:
unit-tests-0_19_0: unit-tests-0_19_0:
name: unit-tests-0.19.0 name: unit-tests-0.19.0
runs-on: ubuntu-22.04 runs-on: ubuntu-24.04
env: env:
DOKKU_TAG: v0.19.0 DOKKU_TAG: v0.19.0
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-python@v5 - uses: actions/setup-python@v6
with: with:
python-version: '3.7.x' python-version: "3.13"
- run: make setup - run: make setup

View File

@@ -5,15 +5,16 @@ name: "tagged-release"
on: on:
push: push:
tags: tags:
- '*' - "*"
jobs: jobs:
tagged-release: tagged-release:
name: tagged-release name: tagged-release
runs-on: ubuntu-22.04 runs-on: ubuntu-24.04
steps: steps:
- uses: "marvinpinto/action-automatic-releases@v1.2.1" - name: Release
uses: softprops/action-gh-release@v2.4.1
with: with:
repo_token: "${{ secrets.GITHUB_TOKEN }}" generate_release_notes: true
prerelease: false make_latest: "true"

View File

@@ -1 +1 @@
FROM postgres:16.4 FROM mirror.ccs.tencentyun.com/library/postgres:17.5

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.4](https://hub.docker.com/_/postgres/). Official postgres plugin for dokku. Currently defaults to installing [postgres 17.5](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
@@ -349,7 +359,7 @@ Expose the service on the service's normal ports, allowing access to it from the
dokku postgres:expose lollipop 5432 dokku postgres:expose lollipop 5432
``` ```
Expose the service on the service's normal ports, with the first on a specified ip adddress (127.0.0.1): Expose the service on the service's normal ports, with the first on a specified ip address (127.0.0.1):
```shell ```shell
dokku postgres:expose lollipop 127.0.0.1:5432 dokku postgres:expose lollipop 127.0.0.1:5432
@@ -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

2
Vagrantfile vendored
View File

@@ -1,7 +1,7 @@
# -*- mode: ruby -*- # -*- mode: ruby -*-
# vi: set ft=ruby : # vi: set ft=ruby :
BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-22.04" BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-24.04"
BOX_MEMORY = ENV["BOX_MEMORY"] || "2048" BOX_MEMORY = ENV["BOX_MEMORY"] || "2048"
DOKKU_VERSION = "master" DOKKU_VERSION = "master"

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.38.0" version = "1.44.0"
[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

@@ -8,7 +8,7 @@ source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"
service-expose-cmd() { service-expose-cmd() {
#E expose the service on the service's normal ports, allowing access to it from the public interface (0.0.0.0) #E expose the service on the service's normal ports, allowing access to it from the public interface (0.0.0.0)
#E dokku $PLUGIN_COMMAND_PREFIX:expose lollipop ${PLUGIN_DATASTORE_PORTS[@]} #E dokku $PLUGIN_COMMAND_PREFIX:expose lollipop ${PLUGIN_DATASTORE_PORTS[@]}
#E expose the service on the service's normal ports, with the first on a specified ip adddress (127.0.0.1) #E expose the service on the service's normal ports, with the first on a specified ip address (127.0.0.1)
#E dokku $PLUGIN_COMMAND_PREFIX:expose lollipop 127.0.0.1:${PLUGIN_DATASTORE_PORTS[@]} #E dokku $PLUGIN_COMMAND_PREFIX:expose lollipop 127.0.0.1:${PLUGIN_DATASTORE_PORTS[@]}
#A service, service to run command against #A service, service to run command against
#A ports, a list of ports to run against #A ports, a list of ports to run against