Compare commits

..

27 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
033b19d680 Release 1.42.1
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-04-28 23:56:48 -04:00
Jose Diaz-Gonzalez
41cd62c666 Merge pull request #191 from dokku/fix-typo
docs: fix typo in generated docs
2025-04-28 23:42:27 -04:00
Jose Diaz-Gonzalez
b75ec6fb8f docs: regenerate readme 2025-04-28 23:41:15 -04:00
Jose Diaz-Gonzalez
03415b6f45 Merge pull request #190 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:28:47 -04:00
Jose Diaz-Gonzalez
2f47264ee3 docs: correct typo in generated readme 2025-04-28 23:07:49 -04:00
dependabot[bot]
c9433c7cd8 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 04:03:13 +00:00
Jose Diaz-Gonzalez
963b43c8b3 Merge pull request #189 from dokku/update-workflows
chore: bump runs-on image from ubuntu-22.04 to ubuntu-24.04
2025-04-17 21:11:09 -04:00
Jose Diaz-Gonzalez
cdd8a6c731 fix: use maintained version of python 2025-04-17 20:46:19 -04:00
Jose Diaz-Gonzalez
4825d92487 chore: bump runs-on image from ubuntu-22.04 to ubuntu-24.04 2025-04-17 20:43:55 -04:00
Jose Diaz-Gonzalez
3079587e0b Release 1.42.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-04-15 04:00:07 -04:00
Jose Diaz-Gonzalez
dfe372bbbd Merge pull request #188 from dokku/dependabot/docker/mysql-9.3.0
chore(deps): bump mysql from 9.2.0 to 9.3.0
2025-04-15 03:57:15 -04:00
dependabot[bot]
d04dc75c81 chore(deps): bump mysql from 9.2.0 to 9.3.0
Bumps mysql from 9.2.0 to 9.3.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-15 03:37:50 +00:00
Jose Diaz-Gonzalez
42dc05c473 Merge pull request #186 from dokku/maintained-action
ci: use maintained action for creating automated releases
2025-03-13 18:51:02 -05:00
Jose Diaz-Gonzalez
658ed34b64 ci: use maintained action for creating automated releases 2025-03-13 19:46:50 -04:00
Jose Diaz-Gonzalez
900d772398 Release 1.41.2
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-03-09 07:11:56 -04:00
Jose Diaz-Gonzalez
ea120dd613 Merge pull request #185 from dokku/7470-name-argument
docs: ensure --name flag is used in installation docs
2025-03-09 06:05:33 -05:00
Jose Diaz-Gonzalez
7d59d4ee36 docs: ensure --name flag is used in installation docs
Closes dokku/dokku#7470
2025-03-09 07:03:59 -04:00
Jose Diaz-Gonzalez
4ddf27d340 Release 1.41.1
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2025-02-02 00:29:21 -05:00
Jose Diaz-Gonzalez
6a75d5d509 Merge pull request #184 from dokku/dependabot/docker/mysql-9.2.0
chore(deps): bump mysql from 9.1.0 to 9.2.0
2025-02-01 23:29:07 -06:00
dependabot[bot]
31f737bb09 chore(deps): bump mysql from 9.1.0 to 9.2.0
Bumps mysql from 9.1.0 to 9.2.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 03:22:53 +00:00
Jose Diaz-Gonzalez
d8c4d28fb0 Release 1.41.0
Some checks failed
tagged-release / tagged-release (push) Has been cancelled
2024-11-24 22:19:00 -05:00
Jose Diaz-Gonzalez
5c59f5adc1 Merge pull request #183 from dokku/use-gpg-public-key-encryption
feat: implement GPG Public Key encryption support
2024-11-24 21:05:15 -05:00
Jose Diaz-Gonzalez
c212d68183 feat: implement GPG Public Key encryption support 2024-11-24 20:21:59 -05:00
Jose Diaz-Gonzalez
3f5db87844 Merge pull request #181 from dokku/dependabot/docker/mysql-9.1.0
chore(deps): bump mysql from 9.0.1 to 9.1.0
2024-11-24 19:58:32 -05:00
Jose Diaz-Gonzalez
9e13103e04 Merge pull request #182 from dokku/enable-image-overrides
feat: enable env overrides for support images and update all to latest
2024-11-24 19:58:23 -05:00
Jose Diaz-Gonzalez
1896d0d3a4 feat: enable env overrides for support images and update all to latest 2024-11-24 19:15:23 -05:00
dependabot[bot]
b9349d3ae1 chore(deps): bump mysql from 9.0.1 to 9.1.0
Bumps mysql from 9.0.1 to 9.1.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-16 03:22:43 +00:00
12 changed files with 124 additions and 22 deletions

View File

@@ -5,7 +5,7 @@ name: CI
on: on:
pull_request: pull_request:
branches: branches:
- '*' - "*"
push: push:
branches: branches:
- master - master
@@ -17,7 +17,7 @@ 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
@@ -28,7 +28,7 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: '3.7.x' python-version: "3.13"
- run: make setup - run: make setup
@@ -59,7 +59,7 @@ 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
@@ -70,7 +70,7 @@ jobs:
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
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.2.2
with: with:
repo_token: "${{ secrets.GITHUB_TOKEN }}" generate_release_notes: true
prerelease: false make_latest: "true"

View File

@@ -1 +1 @@
FROM mysql:9.0.1 FROM mysql:9.3.0

View File

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

View File

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

View File

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

View File

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

View File

@@ -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