Skip to content

Commit 56f688e

Browse files
committed
fix: allow config directory to be configurable
For postgres, the config directory doesn't actually exist, so adding this configurability allows the plugin's info command to report correctly.
1 parent ba24332 commit 56f688e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

common-functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ service_info() {
383383
local flag key valid_flags
384384

385385
local flag_map=(
386-
"--config-dir: ${SERVICE_ROOT}/config"
386+
"--config-dir: ${SERVICE_ROOT}/${PLUGIN_CONFIG_SUFFIX}"
387387
"--data-dir: ${SERVICE_ROOT}/data"
388388
"--dsn: ${SERVICE_URL}"
389389
"--exposed-ports: $(service_exposed_ports "$SERVICE")"

config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export PLUGIN_SCHEME="postgres"
2121
export PLUGIN_SERVICE="Postgres"
2222
export PLUGIN_VARIABLE="POSTGRES"
2323
export PLUGIN_BASE_PATH="$PLUGIN_PATH"
24+
export PLUGIN_CONFIG_SUFFIX="data"
2425
if [[ -n $DOKKU_API_VERSION ]]; then
2526
export PLUGIN_BASE_PATH="$PLUGIN_ENABLED_PATH"
2627
fi

subcommands/destroy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ service-destroy-cmd() {
4545
service_container_rm "$SERVICE"
4646

4747
dokku_log_verbose_quiet "Removing data"
48-
docker run --rm -v "$SERVICE_HOST_ROOT/data:/data" -v "$SERVICE_HOST_ROOT/config:/config" "$PLUGIN_BUSYBOX_IMAGE" chmod 777 -R /config /data
48+
docker run --rm -v "$SERVICE_HOST_ROOT/data:/data" -v "$SERVICE_HOST_ROOT/$PLUGIN_CONFIG_SUFFIX:/config" "$PLUGIN_BUSYBOX_IMAGE" chmod 777 -R /config /data
4949
rm -rf "$SERVICE_ROOT"
5050

5151
dokku_log_info2 "$PLUGIN_SERVICE container deleted: $SERVICE"

0 commit comments

Comments
 (0)