Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91b0a4ad00 | ||
|
|
e1f721f39b | ||
|
|
2f816534da | ||
|
|
9ab50f6feb | ||
|
|
d8b3273161 | ||
|
|
d1da450dc9 | ||
|
|
0ed012a16b | ||
|
|
ef356c56de | ||
|
|
2021cb23da | ||
|
|
e844659f8f | ||
|
|
88ad80c096 | ||
|
|
ba3d81cd20 | ||
|
|
0c625d5e71 | ||
|
|
b787d66665 | ||
|
|
627ebb5ab6 | ||
|
|
da56f1b26e | ||
|
|
081ab67c14 | ||
|
|
61f0d78a93 | ||
|
|
b18d0838b9 | ||
|
|
bb9829883b | ||
|
|
f3a2c3cbbc | ||
|
|
29057e00a2 | ||
|
|
6577443afb | ||
|
|
81ff14518d | ||
|
|
14f670c7c4 | ||
|
|
864b50891b | ||
|
|
e9fad47842 | ||
|
|
9258d77b12 | ||
|
|
f4698b1e5f | ||
|
|
f07d950cd9 | ||
|
|
7bca464cd6 | ||
|
|
d40e7c7619 | ||
|
|
5822176870 | ||
|
|
5171614175 | ||
|
|
1077c49a15 | ||
|
|
50a7923695 | ||
|
|
13e46bafcf | ||
|
|
10fa2ebd35 | ||
|
|
151176e142 | ||
|
|
1110b7a560 | ||
|
|
e907c8c218 | ||
|
|
09a7cb820b | ||
|
|
d6976a5290 | ||
|
|
453e4993b9 |
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
|
|
||||||
- run: make test
|
- run: make test
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: tmp/test-results
|
name: tmp/test-results
|
||||||
@@ -93,7 +93,7 @@ jobs:
|
|||||||
|
|
||||||
- run: make test
|
- run: make test
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: tmp/test-results
|
name: tmp/test-results
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
FROM postgres:16.1
|
FROM postgres:17.3
|
||||||
|
|||||||
5
Makefile
5
Makefile
@@ -1,5 +1,6 @@
|
|||||||
HARDWARE = $(shell uname -m)
|
HARDWARE = $(shell uname -m)
|
||||||
SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||||
|
ARCH = $(shell dpkg --print-architecture)
|
||||||
SHFMT_VERSION = 3.0.2
|
SHFMT_VERSION = 3.0.2
|
||||||
XUNIT_TO_GITHUB_VERSION = 0.3.0
|
XUNIT_TO_GITHUB_VERSION = 0.3.0
|
||||||
XUNIT_READER_VERSION = 0.1.0
|
XUNIT_READER_VERSION = 0.1.0
|
||||||
@@ -20,8 +21,12 @@ shellcheck:
|
|||||||
ifneq ($(shell shellcheck --version >/dev/null 2>&1 ; echo $$?),0)
|
ifneq ($(shell shellcheck --version >/dev/null 2>&1 ; echo $$?),0)
|
||||||
ifeq ($(SYSTEM_NAME),darwin)
|
ifeq ($(SYSTEM_NAME),darwin)
|
||||||
brew install shellcheck
|
brew install shellcheck
|
||||||
|
else
|
||||||
|
ifeq ($(ARCH),arm64)
|
||||||
|
sudo add-apt-repository 'deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse'
|
||||||
else
|
else
|
||||||
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse'
|
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse'
|
||||||
|
endif
|
||||||
sudo rm -rf /var/lib/apt/lists/* && sudo apt-get clean
|
sudo rm -rf /var/lib/apt/lists/* && sudo apt-get clean
|
||||||
sudo apt-get update -qq && sudo apt-get install -qq -y shellcheck
|
sudo apt-get update -qq && sudo apt-get install -qq -y shellcheck
|
||||||
endif
|
endif
|
||||||
|
|||||||
38
README.md
38
README.md
@@ -1,6 +1,6 @@
|
|||||||
# dokku postgres [](https://github.com/dokku/dokku-postgres/actions/workflows/ci.yml?query=branch%3Amaster) [](https://webchat.libera.chat/?channels=dokku)
|
# dokku postgres [](https://github.com/dokku/dokku-postgres/actions/workflows/ci.yml?query=branch%3Amaster) [](https://webchat.libera.chat/?channels=dokku)
|
||||||
|
|
||||||
Official postgres plugin for dokku. Currently defaults to installing [postgres 16.1](https://hub.docker.com/_/postgres/).
|
Official postgres plugin for dokku. Currently defaults to installing [postgres 17.3](https://hub.docker.com/_/postgres/).
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
@@ -24,8 +24,10 @@ postgres:backup-deauth <service> # remove backup authenticatio
|
|||||||
postgres:backup-schedule <service> <schedule> <bucket-name> [--use-iam] # schedule a backup of the postgres service
|
postgres:backup-schedule <service> <schedule> <bucket-name> [--use-iam] # schedule a backup of the postgres service
|
||||||
postgres:backup-schedule-cat <service> # cat the contents of the configured backup cronfile for the service
|
postgres:backup-schedule-cat <service> # cat the contents of the configured backup cronfile for the service
|
||||||
postgres:backup-set-encryption <service> <passphrase> # set encryption for all future backups of postgres service
|
postgres:backup-set-encryption <service> <passphrase> # set encryption for all future backups of postgres service
|
||||||
|
postgres:backup-set-public-key-encryption <service> <public-key-id> # set GPG Public Key encryption for all future backups of postgres service
|
||||||
postgres:backup-unschedule <service> # unschedule the backup of the postgres service
|
postgres:backup-unschedule <service> # unschedule the backup of the postgres service
|
||||||
postgres:backup-unset-encryption <service> # unset encryption for future backups of the postgres service
|
postgres:backup-unset-encryption <service> # unset encryption for future backups of the postgres service
|
||||||
|
postgres:backup-unset-public-key-encryption <service> # unset GPG Public Key encryption for future backups of the postgres service
|
||||||
postgres:clone <service> <new-service> [--clone-flags...] # create container <new-name> then copy data from <name> into <new-name>
|
postgres:clone <service> <new-service> [--clone-flags...] # create container <new-name> then copy data from <name> into <new-name>
|
||||||
postgres:connect <service> # connect to the service via the postgres connection tool
|
postgres:connect <service> # connect to the service via the postgres connection tool
|
||||||
postgres:create <service> [--create-flags...] # create a postgres service
|
postgres:create <service> [--create-flags...] # create a postgres service
|
||||||
@@ -103,9 +105,17 @@ dokku postgres:create lollipop
|
|||||||
Official Postgres "$DOCKER_BIN" image ls does not include postgis extension (amongst others). The following example creates a new postgres service using `postgis/postgis:13-3.1` image, which includes the `postgis` extension.
|
Official Postgres "$DOCKER_BIN" image ls does not include postgis extension (amongst others). The following example creates a new postgres service using `postgis/postgis:13-3.1` image, which includes the `postgis` extension.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
# use the appropriate image-version for your use-case
|
||||||
dokku postgres:create postgis-database --image "postgis/postgis" --image-version "13-3.1"
|
dokku postgres:create postgis-database --image "postgis/postgis" --image-version "13-3.1"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To use pgvector instead, run the following:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# use the appropriate image-version for your use-case
|
||||||
|
dokku postgres:create pgvector-database --image "pgvector/pgvector" --image-version "pg17"
|
||||||
|
```
|
||||||
|
|
||||||
### print the service information
|
### print the service information
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -718,6 +728,19 @@ Set the GPG-compatible passphrase for encrypting backups for backups:
|
|||||||
dokku postgres:backup-set-encryption lollipop
|
dokku postgres:backup-set-encryption lollipop
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### set GPG Public Key encryption for all future backups of postgres service
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# usage
|
||||||
|
dokku postgres:backup-set-public-key-encryption <service> <public-key-id>
|
||||||
|
```
|
||||||
|
|
||||||
|
Set the `GPG` Public Key for encrypting backups:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku postgres:backup-set-public-key-encryption lollipop
|
||||||
|
```
|
||||||
|
|
||||||
### unset encryption for future backups of the postgres service
|
### unset encryption for future backups of the postgres service
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -731,6 +754,19 @@ Unset the `GPG` encryption passphrase for backups:
|
|||||||
dokku postgres:backup-unset-encryption lollipop
|
dokku postgres:backup-unset-encryption lollipop
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### unset GPG Public Key encryption for future backups of the postgres service
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# usage
|
||||||
|
dokku postgres:backup-unset-public-key-encryption <service>
|
||||||
|
```
|
||||||
|
|
||||||
|
Unset the `GPG` Public Key encryption for backups:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku postgres:backup-unset-public-key-encryption lollipop
|
||||||
|
```
|
||||||
|
|
||||||
### schedule a backup of the postgres service
|
### schedule a backup of the postgres service
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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
8
config
@@ -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:=""}
|
||||||
|
|||||||
@@ -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"
|
||||||
|
```
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku postgres service plugin"
|
description = "dokku postgres service plugin"
|
||||||
version = "1.36.1"
|
version = "1.42.0"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
25
subcommands/backup-set-public-key-encryption
Executable file
25
subcommands/backup-set-public-key-encryption
Executable 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 "$@"
|
||||||
23
subcommands/backup-unset-public-key-encryption
Executable file
23
subcommands/backup-unset-public-key-encryption
Executable 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 "$@"
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user