refactor: move nginx.conf.sigil files into app-specific directories
This commit is contained in:
@@ -18,8 +18,8 @@ trigger-nginx-vhosts-core-post-deploy() {
|
|||||||
if [[ "$HAS_NETWORK_CONFIG" == "true" ]]; then
|
if [[ "$HAS_NETWORK_CONFIG" == "true" ]]; then
|
||||||
plugn trigger domains-setup "$APP"
|
plugn trigger domains-setup "$APP"
|
||||||
nginx_build_config "$APP"
|
nginx_build_config "$APP"
|
||||||
if [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-$DOKKU_PID.nginx.conf.sigil" ]]; then
|
if [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" ]]; then
|
||||||
mv "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-$DOKKU_PID.nginx.conf.sigil" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-nginx.conf.sigil"
|
mv "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ trigger-nginx-vhosts-core-post-extract() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-$DOKKU_PID.nginx.conf.sigil"
|
mkdir -p "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP"
|
||||||
cp -f "$CONF_SIGIL_PATH" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-$DOKKU_PID.nginx.conf.sigil"
|
rm -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil."*
|
||||||
|
cp -f "$CONF_SIGIL_PATH" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID"
|
||||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -190,10 +190,10 @@ get_custom_nginx_template() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-$DOKKU_PID.nginx.conf.sigil" ]]; then
|
if [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" ]]; then
|
||||||
cp "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-$DOKKU_PID.nginx.conf.sigil" "$DESTINATION_FILE"
|
cp "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" "$DESTINATION_FILE"
|
||||||
elif [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-nginx.conf.sigil" ]]; then
|
elif [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil" ]]; then
|
||||||
cp "${DOKKU_LIB_ROOT}/data/nginx-vhosts/$APP-nginx.conf.sigil" "$DESTINATION_FILE"
|
cp "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil" "$DESTINATION_FILE"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user