Compare commits

...

80 Commits

Author SHA1 Message Date
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
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
Jose Diaz-Gonzalez
3bac8ed944 Release 1.36.1
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2023-12-09 23:56:11 -05:00
Jose Diaz-Gonzalez
d956ded91c docs: update docs and generation script 2023-12-09 23:55:46 -05:00
Jose Diaz-Gonzalez
2fd010d955 chore: fix typo 2023-12-09 13:51:12 -05:00
Jose Diaz-Gonzalez
b2eb07f839 chore: fix typo 2023-12-09 13:48:47 -05:00
Jose Diaz-Gonzalez
f8c688cce0 Merge pull request #307 from dokku/dependabot/docker/postgres-16.1
chore(deps): bump postgres from 16.0 to 16.1
2023-12-09 13:48:01 -05:00
Jose Diaz-Gonzalez
f6817bdb3a Merge pull request #310 from dokku/dependabot/github_actions/actions/setup-python-5
chore(deps): bump actions/setup-python from 4 to 5
2023-12-09 13:47:50 -05:00
dependabot[bot]
46eac4e22c chore(deps): bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-07 02:13:56 +00:00
dependabot[bot]
9263eb6505 chore(deps): bump postgres from 16.0 to 16.1
Bumps postgres from 16.0 to 16.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-15 02:11:29 +00:00
Jose Diaz-Gonzalez
fb0bcb4921 Release 1.36.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2023-10-04 10:43:01 -04:00
Jose Diaz-Gonzalez
c587d70c49 Merge pull request #304 from dokku/dependabot/docker/postgres-16.0
chore(deps): bump postgres from 15.4 to 16.0
2023-10-04 10:42:36 -04:00
dependabot[bot]
b7f22a3904 chore(deps): bump postgres from 15.4 to 16.0
Bumps postgres from 15.4 to 16.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 02:35:00 +00:00
Jose Diaz-Gonzalez
777fc95818 Release 1.35.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2023-09-09 22:39:55 -04:00
Jose Diaz-Gonzalez
9bf3b5bb58 Merge pull request #302 from dokku/dependabot/github_actions/actions/checkout-4
chore(deps): bump actions/checkout from 3 to 4
2023-09-07 00:03:19 -04:00
dependabot[bot]
daea399ffd chore(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [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/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-07 03:15:45 +00:00
Jose Diaz-Gonzalez
b81b8d7a00 Merge pull request #303 from dokku/newer-ubuntu
feat: upgrade test suite from ubuntu 20.04 to 22.04
2023-09-06 23:15:25 -04:00
Jose Diaz-Gonzalez
4557c96858 feat: upgrade test suite from ubuntu 20.04 to 22.04 2023-09-06 22:37:21 -04:00
20 changed files with 352 additions and 92 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-20.04 runs-on: ubuntu-24.04
env: env:
DOKKU_VERSION: master DOKKU_VERSION: master
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-python@v4 - uses: actions/setup-python@v5
with: with:
python-version: '3.7.x' python-version: "3.13"
- run: make setup - run: make setup
@@ -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
@@ -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-20.04 runs-on: ubuntu-24.04
env: env:
DOKKU_TAG: v0.19.0 DOKKU_TAG: v0.19.0
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-python@v4 - uses: actions/setup-python@v5
with: with:
python-version: '3.7.x' python-version: "3.13"
- run: make setup - run: make setup
@@ -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

@@ -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-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: "marvinpinto/action-automatic-releases@v1.2.1" - name: Release
uses: softprops/action-gh-release@v2.2.2
with: with:
repo_token: "${{ secrets.GITHUB_TOKEN }}" generate_release_notes: true
prerelease: false make_latest: "true"

View File

@@ -1 +1 @@
FROM postgres:15.4 FROM postgres:17.5

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
@@ -21,7 +22,11 @@ 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 else
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' ifeq ($(ARCH),arm64)
sudo add-apt-repository 'deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse'
else
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 15.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
@@ -74,9 +76,9 @@ flags:
- `-m|--memory MEMORY`: container memory limit in megabytes (default: unlimited) - `-m|--memory MEMORY`: container memory limit in megabytes (default: unlimited)
- `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to - `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to
- `-p|--password PASSWORD`: override the user-level service password - `-p|--password PASSWORD`: override the user-level service password
- `-P|--post-create-network NETWORKS`: a comman-separated list of networks to attach the service container to after service creation - `-P|--post-create-network NETWORKS`: a comma-separated list of networks to attach the service container to after service creation
- `-r|--root-password PASSWORD`: override the root-level service password - `-r|--root-password PASSWORD`: override the root-level service password
- `-S|--post-start-network NETWORKS`: a comman-separated list of networks to attach the service container to after service start - `-S|--post-start-network NETWORKS`: a comma-separated list of networks to attach the service container to after service start
- `-s|--shm-size SHM_SIZE`: override shared memory size for postgres docker container - `-s|--shm-size SHM_SIZE`: override shared memory size for postgres docker container
Create a postgres service named lollipop: Create a postgres service named lollipop:
@@ -93,7 +95,7 @@ export POSTGRES_IMAGE_VERSION="${PLUGIN_IMAGE_VERSION}"
dokku postgres:create lollipop dokku postgres:create lollipop
``` ```
You can also specify custom environment variables to start the postgres service in semi-colon separated form. You can also specify custom environment variables to start the postgres service in semicolon-separated form.
```shell ```shell
export POSTGRES_CUSTOM_ENV="USER=alpha;HOST=beta" export POSTGRES_CUSTOM_ENV="USER=alpha;HOST=beta"
@@ -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
@@ -463,9 +473,9 @@ flags:
- `-i|--image IMAGE`: the image name to start the service with - `-i|--image IMAGE`: the image name to start the service with
- `-I|--image-version IMAGE_VERSION`: the image version to start the service with - `-I|--image-version IMAGE_VERSION`: the image version to start the service with
- `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to - `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to
- `-P|--post-create-network NETWORKS`: a comman-separated list of networks to attach the service container to after service creation - `-P|--post-create-network NETWORKS`: a comma-separated list of networks to attach the service container to after service creation
- `-R|--restart-apps "true"`: whether or not to force an app restart (default: false) - `-R|--restart-apps "true"`: whether or not to force an app restart (default: false)
- `-S|--post-start-network NETWORKS`: a comman-separated list of networks to attach the service container to after service start - `-S|--post-start-network NETWORKS`: a comma-separated list of networks to attach the service container to after service start
- `-s|--shm-size SHM_SIZE`: override shared memory size for postgres docker container - `-s|--shm-size SHM_SIZE`: override shared memory size for postgres docker container
You can upgrade an existing service to a new image or image-version: You can upgrade an existing service to a new image or image-version:
@@ -538,9 +548,9 @@ flags:
- `-m|--memory MEMORY`: container memory limit in megabytes (default: unlimited) - `-m|--memory MEMORY`: container memory limit in megabytes (default: unlimited)
- `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to - `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to
- `-p|--password PASSWORD`: override the user-level service password - `-p|--password PASSWORD`: override the user-level service password
- `-P|--post-create-network NETWORKS`: a comman-separated list of networks to attach the service container to after service creation - `-P|--post-create-network NETWORKS`: a comma-separated list of networks to attach the service container to after service creation
- `-r|--root-password PASSWORD`: override the root-level service password - `-r|--root-password PASSWORD`: override the root-level service password
- `-S|--post-start-network NETWORKS`: a comman-separated list of networks to attach the service container to after service start - `-S|--post-start-network NETWORKS`: a comma-separated list of networks to attach the service container to after service start
- `-s|--shm-size SHM_SIZE`: override shared memory size for postgres docker container - `-s|--shm-size SHM_SIZE`: override shared memory size for postgres docker container
You can clone an existing service to a new one: You can clone an existing service to a new one:
@@ -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-20.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

@@ -1,15 +1,30 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import print_function from __future__ import print_function
import os import os
import re import re
def compile(service, version, variable, alias, image, scheme, ports, sponsors, options, unimplemented, dokku_version): def compile(
prefix = "\n\n".join([ service,
version,
variable,
alias,
image,
scheme,
ports,
sponsors,
options,
unimplemented,
dokku_version,
):
prefix = "\n\n".join(
[
header(service), header(service),
description(service, image, version), description(service, image, version),
]) ]
)
if len(sponsors) > 0: if len(sponsors) > 0:
prefix += "\n\n" prefix += "\n\n"
@@ -21,8 +36,19 @@ def compile(service, version, variable, alias, image, scheme, ports, sponsors, o
prefix, prefix,
requirements_section(dokku_version), requirements_section(dokku_version),
installation_section(service, dokku_version), installation_section(service, dokku_version),
commands_section(service, variable, alias, image, scheme, ports, unimplemented), commands_section(
usage_section(service, variable, alias, image, scheme, ports, options, unimplemented), service, variable, alias, image, scheme, ports, unimplemented
),
usage_section(
service,
variable,
alias,
image,
scheme,
ports,
options,
unimplemented,
),
] ]
) )
.replace("\n\n\n\n\n", "\n") .replace("\n\n\n\n\n", "\n")
@@ -55,17 +81,25 @@ def sponsors_section(service, sponsors):
if len(sponsors) == 0: if len(sponsors) == 0:
return "" return ""
sponsor_data = ["## Sponsors", "", f"The {service} plugin was generously sponsored by the following:", ""] sponsor_data = [
"## Sponsors",
"",
f"The {service} plugin was generously sponsored by the following:",
"",
]
sponsor_data.extend([f"- [{s}](https://github.com/{s})" for s in sponsors]) sponsor_data.extend([f"- [{s}](https://github.com/{s})" for s in sponsors])
return "\n".join( return "\n".join(sponsor_data)
sponsor_data
)
def requirements_section(dokku_version): def requirements_section(dokku_version):
return "\n".join( return "\n".join(
["## Requirements", "", f"- dokku {dokku_version}", "- docker 1.8.x",] [
"## Requirements",
"",
f"- dokku {dokku_version}",
"- docker 1.8.x",
]
) )
@@ -76,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}",
"```", "```",
] ]
) )
@@ -115,17 +149,31 @@ def commands_section(service, variable, alias, image, scheme, ports, unimplement
return "\n".join(content) return "\n".join(content)
def usage_section(service, variable, alias, image, scheme, ports, options, unimplemented): def usage_section(
service, variable, alias, image, scheme, ports, options, unimplemented
):
return "\n\n".join( return "\n\n".join(
[ [
"## Usage", "## Usage",
f"Help for any commands can be displayed by specifying the command as an argument to {service}:help. Plugin help output in conjunction with any files in the `docs/` folder is used to generate the plugin documentation. Please consult the `{service}:help` command for any undocumented commands.", f"Help for any commands can be displayed by specifying the command as an argument to {service}:help. Plugin help output in conjunction with any files in the `docs/` folder is used to generate the plugin documentation. Please consult the `{service}:help` command for any undocumented commands.",
usage_intro(service, variable, alias, image, scheme, ports, options, unimplemented), usage_intro(
usage_lifecycle(service, variable, alias, image, scheme, ports, options, unimplemented), service, variable, alias, image, scheme, ports, options, unimplemented
usage_automation(service, variable, alias, image, scheme, ports, options, unimplemented), ),
usage_data_management(service, variable, alias, image, scheme, ports, options, unimplemented), usage_lifecycle(
usage_backup(service, variable, alias, image, scheme, ports, options, unimplemented), service, variable, alias, image, scheme, ports, options, unimplemented
usage_docker_pull(service, variable, alias, image, scheme, ports, options, unimplemented), ),
usage_automation(
service, variable, alias, image, scheme, ports, options, unimplemented
),
usage_data_management(
service, variable, alias, image, scheme, ports, options, unimplemented
),
usage_backup(
service, variable, alias, image, scheme, ports, options, unimplemented
),
usage_docker_pull(
service, variable, alias, image, scheme, ports, options, unimplemented
),
] ]
) )
@@ -135,11 +183,22 @@ def usage_intro(service, variable, alias, image, scheme, ports, options, unimple
content = ["### Basic Usage"] content = ["### Basic Usage"]
return fetch_commands_content( return fetch_commands_content(
service, variable, alias, image, scheme, ports, options, unimplemented, commands, content service,
variable,
alias,
image,
scheme,
ports,
options,
unimplemented,
commands,
content,
) )
def usage_lifecycle(service, variable, alias, image, scheme, ports, options, unimplemented): def usage_lifecycle(
service, variable, alias, image, scheme, ports, options, unimplemented
):
commands = [ commands = [
"connect", "connect",
"enter", "enter",
@@ -160,11 +219,22 @@ def usage_lifecycle(service, variable, alias, image, scheme, ports, options, uni
] ]
return fetch_commands_content( return fetch_commands_content(
service, variable, alias, image, scheme, ports, options, unimplemented, commands, content service,
variable,
alias,
image,
scheme,
ports,
options,
unimplemented,
commands,
content,
) )
def usage_automation(service, variable, alias, image, scheme, ports, options, unimplemented): def usage_automation(
service, variable, alias, image, scheme, ports, options, unimplemented
):
commands = ["app-links", "clone", "exists", "linked", "links"] commands = ["app-links", "clone", "exists", "linked", "links"]
content = [ content = [
"### Service Automation", "### Service Automation",
@@ -174,11 +244,22 @@ def usage_automation(service, variable, alias, image, scheme, ports, options, un
] ]
return fetch_commands_content( return fetch_commands_content(
service, variable, alias, image, scheme, ports, options, unimplemented, commands, content service,
variable,
alias,
image,
scheme,
ports,
options,
unimplemented,
commands,
content,
) )
def usage_data_management(service, variable, alias, image, scheme, ports, options, unimplemented): def usage_data_management(
service, variable, alias, image, scheme, ports, options, unimplemented
):
commands = ["import", "export"] commands = ["import", "export"]
content = [ content = [
"### Data Management", "### Data Management",
@@ -188,17 +269,30 @@ def usage_data_management(service, variable, alias, image, scheme, ports, option
] ]
return fetch_commands_content( return fetch_commands_content(
service, variable, alias, image, scheme, ports, options, unimplemented, commands, content service,
variable,
alias,
image,
scheme,
ports,
options,
unimplemented,
commands,
content,
) )
def usage_backup(service, variable, alias, image, scheme, ports, options, unimplemented): def usage_backup(
service, variable, alias, image, scheme, ports, options, unimplemented
):
commands = [ commands = [
"backup-auth", "backup-auth",
"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",
@@ -215,11 +309,22 @@ def usage_backup(service, variable, alias, image, scheme, ports, options, unimpl
] ]
return fetch_commands_content( return fetch_commands_content(
service, variable, alias, image, scheme, ports, options, unimplemented, commands, content service,
variable,
alias,
image,
scheme,
ports,
options,
unimplemented,
commands,
content,
) )
def usage_docker_pull(service, variable, alias, image, scheme, ports, options, unimplemented): def usage_docker_pull(
service, variable, alias, image, scheme, ports, options, unimplemented
):
service_prefix = service.upper() service_prefix = service.upper()
return "\n".join( return "\n".join(
[ [
@@ -233,11 +338,30 @@ def usage_docker_pull(service, variable, alias, image, scheme, ports, options, u
def fetch_commands_content( def fetch_commands_content(
service, variable, alias, image, scheme, ports, options, unimplemented, commands, content service,
variable,
alias,
image,
scheme,
ports,
options,
unimplemented,
commands,
content,
): ):
i = 0 i = 0
for command in commands: for command in commands:
output = command_help(command, service, variable, alias, image, scheme, ports, options, unimplemented) output = command_help(
command,
service,
variable,
alias,
image,
scheme,
ports,
options,
unimplemented,
)
if output == "": if output == "":
continue continue
content.append(output) content.append(output)
@@ -275,7 +399,9 @@ def parse_args(line):
return " ".join(arguments) return " ".join(arguments)
def command_help(command, service, variable, alias, image, scheme, ports, options, unimplemented): def command_help(
command, service, variable, alias, image, scheme, ports, options, unimplemented
):
if command in unimplemented: if command in unimplemented:
return "" return ""
@@ -285,7 +411,7 @@ def command_help(command, service, variable, alias, image, scheme, ports, option
"", "",
"```shell", "```shell",
"# usage", "# usage",
f"dokku {service}:{command} {data['arguments_string']}", f"dokku {service}:{command} {data['arguments_string']}".strip(),
"```", "```",
] ]
@@ -442,11 +568,11 @@ def process_sentence(sentence_lines):
parts = [] parts = []
for word in sentence.strip().split(" "): for word in sentence.strip().split(" "):
if word.isupper() and len(word) > 1: if word.isupper() and len(word) > 1:
for ending in [':', '.']: for ending in [":", "."]:
if word.endswith(ending): if word.endswith(ending):
word = '`{0}`{1}'.format(word[:-1], ending) word = "`{0}`{1}".format(word[:-1], ending)
else: else:
word = '`{0}`'.format(word) word = "`{0}`".format(word)
parts.append(word) parts.append(word)
text.append(" ".join(parts)) text.append(" ".join(parts))
@@ -524,10 +650,22 @@ def main():
with open("plugin.toml") as f: with open("plugin.toml") as f:
for line in f.readlines(): for line in f.readlines():
if line.startswith("sponsors"): if line.startswith("sponsors"):
sponsors = re.search("\[([\"\w\s,_-]+)\]", line).group(1) sponsors = re.search('\[(["\w\s,_-]+)\]', line).group(1)
sponsors = [s.strip("\"") for s in sponsors.split(",")] sponsors = [s.strip('"') for s in sponsors.split(",")]
text = compile(service, version, variable, alias, image, scheme, ports, sponsors, options, unimplemented, "0.19.x+") text = compile(
service,
version,
variable,
alias,
image,
scheme,
ports,
sponsors,
options,
unimplemented,
"0.19.x+",
)
base_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) base_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
readme_file = os.path.join(base_path, "README.md") readme_file = os.path.join(base_path, "README.md")

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.34.2" 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

@@ -17,9 +17,9 @@ service-clone-cmd() {
#F -m|--memory MEMORY, container memory limit in megabytes (default: unlimited) #F -m|--memory MEMORY, container memory limit in megabytes (default: unlimited)
#F -N|--initial-network INITIAL_NETWORK, the initial network to attach the service to #F -N|--initial-network INITIAL_NETWORK, the initial network to attach the service to
#F -p|--password PASSWORD, override the user-level service password #F -p|--password PASSWORD, override the user-level service password
#F -P|--post-create-network NETWORKS, a comman-separated list of networks to attach the service container to after service creation #F -P|--post-create-network NETWORKS, a comma-separated list of networks to attach the service container to after service creation
#F -r|--root-password PASSWORD, override the root-level service password #F -r|--root-password PASSWORD, override the root-level service password
#F -S|--post-start-network NETWORKS, a comman-separated list of networks to attach the service container to after service start #F -S|--post-start-network NETWORKS, a comma-separated list of networks to attach the service container to after service start
#F -s|--shm-size SHM_SIZE, override shared memory size for $PLUGIN_COMMAND_PREFIX docker container #F -s|--shm-size SHM_SIZE, override shared memory size for $PLUGIN_COMMAND_PREFIX docker container
declare desc="create container <new-name> then copy data from <name> into <new-name>" declare desc="create container <new-name> then copy data from <name> into <new-name>"
local cmd="$PLUGIN_COMMAND_PREFIX:clone" argv=("$@") local cmd="$PLUGIN_COMMAND_PREFIX:clone" argv=("$@")

View File

@@ -14,7 +14,7 @@ service-create-cmd() {
#E export ${PLUGIN_VARIABLE}_IMAGE_VERSION="${PLUGIN_IMAGE_VERSION}" #E export ${PLUGIN_VARIABLE}_IMAGE_VERSION="${PLUGIN_IMAGE_VERSION}"
#E dokku $PLUGIN_COMMAND_PREFIX:create lollipop #E dokku $PLUGIN_COMMAND_PREFIX:create lollipop
#E you can also specify custom environment variables to start #E you can also specify custom environment variables to start
#E the ${PLUGIN_COMMAND_PREFIX} service in semi-colon separated form. #E the ${PLUGIN_COMMAND_PREFIX} service in semicolon-separated form.
#E export ${PLUGIN_VARIABLE}_CUSTOM_ENV="USER=alpha;HOST=beta" #E export ${PLUGIN_VARIABLE}_CUSTOM_ENV="USER=alpha;HOST=beta"
#E dokku $PLUGIN_COMMAND_PREFIX:create lollipop #E dokku $PLUGIN_COMMAND_PREFIX:create lollipop
#A service, service to run command against #A service, service to run command against
@@ -25,9 +25,9 @@ service-create-cmd() {
#F -m|--memory MEMORY, container memory limit in megabytes (default: unlimited) #F -m|--memory MEMORY, container memory limit in megabytes (default: unlimited)
#F -N|--initial-network INITIAL_NETWORK, the initial network to attach the service to #F -N|--initial-network INITIAL_NETWORK, the initial network to attach the service to
#F -p|--password PASSWORD, override the user-level service password #F -p|--password PASSWORD, override the user-level service password
#F -P|--post-create-network NETWORKS, a comman-separated list of networks to attach the service container to after service creation #F -P|--post-create-network NETWORKS, a comma-separated list of networks to attach the service container to after service creation
#F -r|--root-password PASSWORD, override the root-level service password #F -r|--root-password PASSWORD, override the root-level service password
#F -S|--post-start-network NETWORKS, a comman-separated list of networks to attach the service container to after service start #F -S|--post-start-network NETWORKS, a comma-separated list of networks to attach the service container to after service start
#F -s|--shm-size SHM_SIZE, override shared memory size for $PLUGIN_COMMAND_PREFIX docker container #F -s|--shm-size SHM_SIZE, override shared memory size for $PLUGIN_COMMAND_PREFIX docker container
declare desc="create a $PLUGIN_SERVICE service" declare desc="create a $PLUGIN_SERVICE service"
local cmd="$PLUGIN_COMMAND_PREFIX:create" argv=("$@") local cmd="$PLUGIN_COMMAND_PREFIX:create" argv=("$@")

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

View File

@@ -15,9 +15,9 @@ service-upgrade-cmd() {
#F -i|--image IMAGE, the image name to start the service with #F -i|--image IMAGE, the image name to start the service with
#F -I|--image-version IMAGE_VERSION, the image version to start the service with #F -I|--image-version IMAGE_VERSION, the image version to start the service with
#F -N|--initial-network INITIAL_NETWORK, the initial network to attach the service to #F -N|--initial-network INITIAL_NETWORK, the initial network to attach the service to
#F -P|--post-create-network NETWORKS, a comman-separated list of networks to attach the service container to after service creation #F -P|--post-create-network NETWORKS, a comma-separated list of networks to attach the service container to after service creation
#F -R|--restart-apps "true", whether or not to force an app restart (default: false) #F -R|--restart-apps "true", whether or not to force an app restart (default: false)
#F -S|--post-start-network NETWORKS, a comman-separated list of networks to attach the service container to after service start #F -S|--post-start-network NETWORKS, a comma-separated list of networks to attach the service container to after service start
#F -s|--shm-size SHM_SIZE, override shared memory size for $PLUGIN_COMMAND_PREFIX docker container #F -s|--shm-size SHM_SIZE, override shared memory size for $PLUGIN_COMMAND_PREFIX docker container
declare desc="upgrade service <service> to the specified versions" declare desc="upgrade service <service> to the specified versions"
local cmd="$PLUGIN_COMMAND_PREFIX:upgrade" argv=("$@") local cmd="$PLUGIN_COMMAND_PREFIX:upgrade" argv=("$@")

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