Compare commits

...

68 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
4ced6bd2e7 Release 1.40.4
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-08-22 03:09:55 -04:00
Jose Diaz-Gonzalez
4e92b82fa9 Merge pull request #281 from dokku/dependabot/docker/redis-8.2.1
chore(deps): bump redis from 8.2.0 to 8.2.1
2025-08-22 03:09:48 -04:00
dependabot[bot]
091e870dac chore(deps): bump redis from 8.2.0 to 8.2.1
Bumps redis from 8.2.0 to 8.2.1.

---
updated-dependencies:
- dependency-name: redis
  dependency-version: 8.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19 22:23:56 +00:00
Jose Diaz-Gonzalez
94aaf2559c Merge pull request #280 from dokku/dependabot/github_actions/actions/checkout-5
chore(deps): bump actions/checkout from 4 to 5
2025-08-12 11:46:39 -04:00
dependabot[bot]
d1936e8756 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-11 19:58:19 +00:00
Jose Diaz-Gonzalez
3f90d6ca6b Release 1.40.3
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-08-08 17:05:50 -04:00
Jose Diaz-Gonzalez
603af87bd1 Merge pull request #279 from dokku/dependabot/docker/redis-8.2.0
chore(deps): bump redis from 8.0.3 to 8.2.0
2025-08-08 17:05:42 -04:00
dependabot[bot]
1a6536d398 chore(deps): bump redis from 8.0.3 to 8.2.0
Bumps redis from 8.0.3 to 8.2.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-05 16:27:36 +00:00
Jose Diaz-Gonzalez
412b300953 Release 1.40.2
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-07-25 05:11:48 -04:00
Jose Diaz-Gonzalez
05d5e6e1fb Merge pull request #277 from dokku/dependabot/docker/redis-8.0.3
chore(deps): bump redis from 8.0.2 to 8.0.3
2025-07-25 05:11:44 -04:00
dependabot[bot]
707bccbb96 chore(deps): bump redis from 8.0.2 to 8.0.3
Bumps redis from 8.0.2 to 8.0.3.

---
updated-dependencies:
- dependency-name: redis
  dependency-version: 8.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-08 15:54:50 +00:00
Jose Diaz-Gonzalez
46312ff3df Merge pull request #276 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-12 11:50:29 -04:00
dependabot[bot]
2e2034d4d8 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 16:03:46 +00:00
Jose Diaz-Gonzalez
0dc904c85f Release 1.40.1
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-06-01 22:46:20 -04:00
Jose Diaz-Gonzalez
8fa1c65aa5 Merge pull request #274 from dokku/dependabot/docker/redis-8.0.2
chore(deps): bump redis from 8.0.1 to 8.0.2
2025-06-01 22:43:54 -04:00
dependabot[bot]
0fe00ee95b chore(deps): bump redis from 8.0.1 to 8.0.2
Bumps redis from 8.0.1 to 8.0.2.

---
updated-dependencies:
- dependency-name: redis
  dependency-version: 8.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 20:30:26 +00:00
Jose Diaz-Gonzalez
6cccf014ab Merge pull request #273 from palfrey/stripped-down-default-config
Don't download default config
2025-06-01 16:29:19 -04:00
Tom Parker-Shemilt
09f1b1a858 Don't download default config 2025-05-25 19:23:05 +01:00
Jose Diaz-Gonzalez
772f677d0f Release 1.40.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-05-22 00:28:28 -04:00
Jose Diaz-Gonzalez
078c2c58d4 Merge pull request #271 from dokku/dependabot/docker/redis-8.0.1
chore(deps): bump redis from 7.4.3 to 8.0.1
2025-05-22 00:27:11 -04:00
dependabot[bot]
6316eb7d7d chore(deps): bump redis from 7.4.3 to 8.0.1
Bumps redis from 7.4.3 to 8.0.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-14 15:03:49 +00:00
Jose Diaz-Gonzalez
7f254ed43e Release 1.39.4
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-04-28 23:56:59 -04:00
Jose Diaz-Gonzalez
07c5006247 Merge pull request #269 from dokku/revert-249-fix/url-checker
Revert "Fix url checker. Old code fail if any variables contain the alias or REDIS_URL"
2025-04-28 23:30:06 -04:00
Jose Diaz-Gonzalez
985ef3d19f Revert "Fix url checker. Old code fail if any variables contain the alias or REDIS_URL" 2025-04-28 23:29:58 -04:00
Jose Diaz-Gonzalez
02e828c6aa docs: update readme 2025-04-28 23:16:51 -04:00
Jose Diaz-Gonzalez
1f8a288d80 Merge pull request #249 from grizmio/fix/url-checker
Fix url checker. Old code fail if any variables contain the alias or REDIS_URL
2025-04-28 23:15:57 -04:00
Jose Diaz-Gonzalez
91734c6a15 Merge pull request #267 from dokku/dependabot/docker/redis-7.4.3
chore(deps): bump redis from 7.4.2 to 7.4.3
2025-04-28 23:13:27 -04:00
Jose Diaz-Gonzalez
6d0637c581 Merge pull request #265 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:13:16 -04:00
Jose Diaz-Gonzalez
0a3a272b5e Merge pull request #268 from dokku/fix-typo
docs: fix typo in generated docs
2025-04-28 23:11:18 -04:00
Jose Diaz-Gonzalez
435ca9f8dc docs: correct typo in generated readme 2025-04-28 23:07:50 -04:00
dependabot[bot]
88ab215473 chore(deps): bump redis from 7.4.2 to 7.4.3
Bumps redis from 7.4.2 to 7.4.3.

---
updated-dependencies:
- dependency-name: redis
  dependency-version: 7.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 15:09:39 +00:00
dependabot[bot]
731429e175 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 16:23:39 +00:00
Jose Diaz-Gonzalez
2211d7a095 Merge pull request #264 from dokku/update-workflows
chore: bump runs-on image from ubuntu-22.04 to ubuntu-24.04
2025-04-17 21:11:36 -04:00
Jose Diaz-Gonzalez
4567903371 fix: use maintained version of python 2025-04-17 20:46:21 -04:00
Jose Diaz-Gonzalez
cd1923eb9f chore: bump runs-on image from ubuntu-22.04 to ubuntu-24.04 2025-04-17 20:43:55 -04:00
Jose Diaz-Gonzalez
a488c74d28 Release 1.39.3
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-04-14 10:42:38 -04:00
Jose Diaz-Gonzalez
fc2e7ef408 Merge pull request #263 from kbuilds/fix-config-file-repo
Download the default redis config file from the official Redis repo
2025-04-14 10:41:28 -04:00
Kurtis Jensen
095eb6f89b Add -f flag to curl command
The `-f` flag will make curl fail if there is an http error. This should prevent this command from silently failing (and adding literal "404 error" string to the config file).
2025-04-09 17:21:26 -04:00
Kurtis Jensen
19a339f943 Download the default redis config file from the official Redis repository 2025-04-07 14:19:55 -04:00
Jose Diaz-Gonzalez
7ded70f338 Merge pull request #258 from dokku/maintained-action
ci: use maintained action for creating automated releases
2025-03-13 18:51:18 -05:00
Jose Diaz-Gonzalez
ff7c58599f ci: use maintained action for creating automated releases 2025-03-13 19:46:51 -04:00
Jose Diaz-Gonzalez
7dddac7059 Release 1.39.2
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-03-09 07:12:11 -04:00
Jose Diaz-Gonzalez
e7f710e40a Merge pull request #257 from dokku/7470-name-argument
docs: ensure --name flag is used in installation docs
2025-03-09 06:05:44 -05:00
Jose Diaz-Gonzalez
65e083a34e docs: ensure --name flag is used in installation docs
Closes dokku/dokku#7470
2025-03-09 07:04:00 -04:00
Jose Diaz-Gonzalez
c6cc9491e2 Release 1.39.1
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-02-02 00:44:41 -05:00
Jose Diaz-Gonzalez
5f3d30d789 Merge pull request #256 from dokku/dependabot/docker/redis-7.4.2
chore(deps): bump redis from 7.4.1 to 7.4.2
2025-02-01 23:44:33 -06:00
dependabot[bot]
7e8c8a13a9 chore(deps): bump redis from 7.4.1 to 7.4.2
Bumps redis from 7.4.1 to 7.4.2.

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 15:14:37 +00:00
Jose Diaz-Gonzalez
fa170c55b6 Release 1.39.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-11-24 22:19:11 -05:00
Jose Diaz-Gonzalez
247561556c Merge pull request #255 from dokku/use-gpg-public-key-encryption
feat: implement GPG Public Key encryption support
2024-11-24 21:18:35 -05:00
Jose Diaz-Gonzalez
437a8be70d feat: implement GPG Public Key encryption support 2024-11-24 20:21:59 -05:00
Jose Diaz-Gonzalez
d9aba028c4 Merge pull request #254 from dokku/enable-image-overrides
feat: enable env overrides for support images and update all to latest
2024-11-24 19:57:34 -05:00
Jose Diaz-Gonzalez
dbaeebb3f8 feat: enable env overrides for support images and update all to latest 2024-11-24 19:15:23 -05:00
Jose Diaz-Gonzalez
13a379f2dd Release 1.38.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-10-10 10:47:06 -04:00
Jose Diaz-Gonzalez
003a8f23d9 Merge pull request #253 from dokku/dependabot/docker/redis-7.4.1
chore(deps): bump redis from 7.2.5 to 7.4.1
2024-10-10 10:46:50 -04:00
dependabot[bot]
d7ddc3f1ce chore(deps): bump redis from 7.2.5 to 7.4.1
Bumps redis from 7.2.5 to 7.4.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 15:24:51 +00:00
Enzo Macari
62e132ed2d Fix url checker. Old code fail if any variables contain the alias so FOO_REDIS_URL would match and believe its already defined. 2024-08-05 12:54:44 -04:00
Jose Diaz-Gonzalez
4cffb97b38 Release 1.37.6
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-07-18 19:20:47 -04:00
Jose Diaz-Gonzalez
cb8334e8dd Release 1.37.5
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-06-30 13:48:03 -04:00
Jose Diaz-Gonzalez
1c291d68d4 Merge pull request #243 from dokku/dependabot/docker/redis-7.2.5
chore(deps): bump redis from 7.2.4 to 7.2.5
2024-06-30 13:47:54 -04:00
dependabot[bot]
0d171fa06e ---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-29 07:50:54 +00:00
Jose Diaz-Gonzalez
38721a896d Merge pull request #246 from dokku/exclude-SC1091
tests: exclude SC1091 from shellcheck rules
2024-06-29 03:49:05 -04:00
Jose Diaz-Gonzalez
c7bce9872a tests: exclude SC1091 from shellcheck rules 2024-06-29 03:45:01 -04:00
Jose Diaz-Gonzalez
61bee552d1 Merge pull request #245 from dokku/fix-tests
fix: use .DNSNames instead of .Aliases in tests
2024-06-29 03:41:16 -04:00
Jose Diaz-Gonzalez
b35f5443f2 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
Jose Diaz-Gonzalez
c3a6e3af3c Release 1.37.4
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-01-29 10:10:11 -05:00
Jose Diaz-Gonzalez
14c0a11f3a Merge pull request #221 from nerg4l/fix/make-ubuntu-arm64
fix: use correct repository on arm64 ubuntu image
2024-01-29 10:05:52 -05:00
László GÖRÖG
d90f3bb02a Merge branch 'master' into fix/make-ubuntu-arm64 2023-12-10 10:22:06 +01:00
László GÖRÖG
3ad35ef009 fix: use correct repository on arm64 ubuntu image 2023-08-07 17:37:30 +02:00
16 changed files with 142 additions and 32 deletions

View File

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

View File

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

View File

@@ -1 +1 @@
FROM redis:7.2.4
FROM redis:8.2.1

View File

@@ -1,5 +1,6 @@
HARDWARE = $(shell uname -m)
SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]')
ARCH = $(shell dpkg --print-architecture)
SHFMT_VERSION = 3.0.2
XUNIT_TO_GITHUB_VERSION = 0.3.0
XUNIT_READER_VERSION = 0.1.0
@@ -20,8 +21,12 @@ shellcheck:
ifneq ($(shell shellcheck --version >/dev/null 2>&1 ; echo $$?),0)
ifeq ($(SYSTEM_NAME),darwin)
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
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 apt-get update -qq && sudo apt-get install -qq -y shellcheck
endif

View File

@@ -1,6 +1,6 @@
# dokku redis [![Build Status](https://img.shields.io/github/actions/workflow/status/dokku/dokku-redis/ci.yml?branch=master&style=flat-square "Build Status")](https://github.com/dokku/dokku-redis/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 redis plugin for dokku. Currently defaults to installing [redis 7.2.4](https://hub.docker.com/_/redis/).
Official redis plugin for dokku. Currently defaults to installing [redis 8.2.1](https://hub.docker.com/_/redis/).
## Requirements
@@ -11,7 +11,7 @@ Official redis plugin for dokku. Currently defaults to installing [redis 7.2.4](
```shell
# on 0.19.x+
sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis
sudo dokku plugin:install https://github.com/dokku/dokku-redis.git --name redis
```
## Commands
@@ -24,8 +24,10 @@ redis:backup-deauth <service> # remove backup authenticatio
redis:backup-schedule <service> <schedule> <bucket-name> [--use-iam] # schedule a backup of the redis service
redis:backup-schedule-cat <service> # cat the contents of the configured backup cronfile for the service
redis:backup-set-encryption <service> <passphrase> # set encryption for all future backups of redis service
redis:backup-set-public-key-encryption <service> <public-key-id> # set GPG Public Key encryption for all future backups of redis service
redis:backup-unschedule <service> # unschedule the backup of the redis service
redis:backup-unset-encryption <service> # unset encryption for future backups of the redis service
redis:backup-unset-public-key-encryption <service> # unset GPG Public Key encryption for future backups of the redis service
redis:clone <service> <new-service> [--clone-flags...] # create container <new-name> then copy data from <name> into <new-name>
redis:connect <service> # connect to the service via the redis connection tool
redis:create <service> [--create-flags...] # create a redis service
@@ -343,7 +345,7 @@ Expose the service on the service's normal ports, allowing access to it from the
dokku redis:expose lollipop 6379
```
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
dokku redis:expose lollipop 127.0.0.1:6379
@@ -675,6 +677,19 @@ Set the GPG-compatible passphrase for encrypting backups for backups:
dokku redis:backup-set-encryption lollipop
```
### set GPG Public Key encryption for all future backups of redis service
```shell
# usage
dokku redis:backup-set-public-key-encryption <service> <public-key-id>
```
Set the `GPG` Public Key for encrypting backups:
```shell
dokku redis:backup-set-public-key-encryption lollipop
```
### unset encryption for future backups of the redis service
```shell
@@ -688,6 +703,19 @@ Unset the `GPG` encryption passphrase for backups:
dokku redis:backup-unset-encryption lollipop
```
### unset GPG Public Key encryption for future backups of the redis service
```shell
# usage
dokku redis:backup-unset-public-key-encryption <service>
```
Unset the `GPG` Public Key encryption for backups:
```shell
dokku redis:backup-unset-public-key-encryption lollipop
```
### schedule a backup of the redis service
```shell

2
Vagrantfile vendored
View File

@@ -1,7 +1,7 @@
# -*- mode: 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"
DOKKU_VERSION = "master"

View File

@@ -110,7 +110,7 @@ def installation_section(service, dokku_version):
"",
"```shell",
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",
"backup-set-encryption",
"backup-set-public-key-encryption",
"backup-unset-encryption",
"backup-unset-public-key-encryption",
"backup-schedule",
"backup-schedule-cat",
"backup-unschedule",

View File

@@ -308,6 +308,10 @@ service_backup() {
BACKUP_PARAMETERS="$BACKUP_PARAMETERS -e ENCRYPTION_KEY=$(cat "$BACKUP_ENCRYPTION_CONFIG_ROOT/ENCRYPTION_KEY")"
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
"$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"
}
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() {
declare desc="unschedule the backup of the service"
declare SERVICE="$1"
@@ -450,6 +464,15 @@ service_backup_unset_encryption() {
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() {
declare desc="stop a service and remove the running container"
declare SERVICE="$1"

8
config
View File

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

View File

@@ -47,10 +47,12 @@ service_create() {
mkdir -p "$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX" || dokku_log_fail "Unable to create service config directory"
touch "$LINKS_FILE"
REDIS_SERVICE_CONFIG="$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX/redis.conf"
if [[ -z $REDIS_CONFIG_PATH ]]; then
curl -sSL "https://raw.githubusercontent.com/antirez/redis/${PLUGIN_IMAGE_VERSION:0:3}/redis.conf" >"$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX/redis.conf" || dokku_log_fail "Unable to download the default redis.conf to the config directory"
echo "# requirepass" > $REDIS_SERVICE_CONFIG
else
cp "$REDIS_CONFIG_PATH" "$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX/redis.conf" || dokku_log_fail "Unable to copy the ${REDIS_CONFIG_PATH} to the config directory"
cp "$REDIS_CONFIG_PATH" "$REDIS_SERVICE_CONFIG" || dokku_log_fail "Unable to copy the ${REDIS_CONFIG_PATH} to the config directory"
fi
PASSWORD=$(openssl rand -hex 32)
if [[ -n "$SERVICE_PASSWORD" ]]; then
@@ -59,7 +61,7 @@ service_create() {
fi
echo "$PASSWORD" >"$SERVICE_ROOT/PASSWORD"
chmod 640 "$SERVICE_ROOT/PASSWORD"
sed -i.bak "s/# requirepass.*/requirepass ${PASSWORD}/" "$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX/redis.conf" && rm "$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX/redis.conf.bak"
sed -i.bak "s/# requirepass.*/requirepass ${PASSWORD}/" "$REDIS_SERVICE_CONFIG" && rm "$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX/redis.conf.bak"
service_commit_config "$SERVICE"
write_database_name "$SERVICE"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku redis service plugin"
version = "1.37.3"
version = "1.40.4"
[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() {
#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 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[@]}
#A service, service to run command against
#A ports, a list of ports to run against

View File

@@ -48,7 +48,7 @@ teardown() {
assert_output_contains bridge 0
assert_output_contains custom-network
run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}'
run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}'
echo "output: $output"
echo "status: $status"
assert_success
@@ -120,7 +120,7 @@ teardown() {
assert_output_contains custom-network
assert_output_contains bridge
run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}'
run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}'
echo "output: $output"
echo "status: $status"
assert_success
@@ -192,7 +192,7 @@ teardown() {
assert_output_contains bridge
assert_output_contains custom-network
run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}'
run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.ls -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}'
echo "output: $output"
echo "status: $status"
assert_success
@@ -258,7 +258,7 @@ teardown() {
assert_output_contains bridge
assert_output_contains custom-network
run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.lsa -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.Aliases}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}'
run docker inspect dokku.$PLUGIN_COMMAND_PREFIX.lsa -f '{{range $net,$v := .NetworkSettings.Networks}}{{range $k,$alias := $v.DNSNames}}{{printf "alias:%s\n" $alias}}{{end}}{{end}}'
echo "output: $output"
echo "status: $status"
assert_success

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
# SC1091 - Not following - <https://github.com/koalaman/shellcheck/wiki/SC1091>
# SC2034 - Variable appears unused. Verify it or export it - https://github.com/koalaman/shellcheck/wiki/SC2034
# SC2155 - Declare and assign separately to avoid masking return values - https://github.com/koalaman/shellcheck/wiki/SC2155
# SC2206 - Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a - https://github.com/koalaman/shellcheck/wiki/SC2206