Files
dokku/plugins/nginx-vhosts/post-deploy
2015-02-06 08:28:14 -08:00

16 lines
394 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
APP="$1"; PORT="$2"; IP="$3"
set +e; NO_VHOST=$(dokku config:get $APP NO_VHOST); set -e
if [[ -n "$NO_VHOST" ]]; then
dokku_log_info1 "NO_VHOST config detected"
elif [[ ! -f "$DOKKU_ROOT/$APP/VHOST" ]]; then
dokku domains:setup $APP
fi
dokku nginx:build-config $APP $PORT $IP