Files
dokku-mongo/.devcontainer/20_init_plugin
Jose Diaz-Gonzalez f7ba17a685 chore: run shfmt
2022-07-25 01:15:32 -04:00

25 lines
484 B
Bash
Executable File

#!/bin/bash
set -eo pipefail
log-info() {
declare desc="Log info formatter"
echo " $*" 1>&2
}
log-fail() {
declare desc="Log fail formatter"
echo "! $*" 1>&2
exit 1
}
main() {
dokku plugin:install
# built in the Dockerfile
PLUGIN_NAME="$(source /tmp/.env && echo "$PLUGIN_NAME")"
PLUGIN_VARIABLE="$(source /tmp/.env && echo "$PLUGIN_VARIABLE")"
echo "export ${PLUGIN_VARIABLE}_HOST_ROOT=${SERVICE_HOST_ROOT}/$PLUGIN_NAME" >/etc/default/dokku
}
main "$@"