Files
dokku/plugins/apps/functions
Jose Diaz-Gonzalez 8e9d04ae36 Add post-create hook
Note that this is invoked *before* the application is deployed, so it's usage is quite different than a potential post-successful-create hook.
2015-11-26 15:47:59 -05:00

14 lines
400 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
apps_create() {
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
[[ -d "$DOKKU_ROOT/$1" ]] && dokku_log_fail "Name is already taken"
local APP="$1"
mkdir -p "$DOKKU_ROOT/$APP"
echo "Creating $APP... done"
plugn trigger post-create $APP
}