feat: start caddy/nginx/traefik prior to restoring applications
This ensures routing works as expected.
This commit is contained in:
1 parent
b97a5c0c00
commit
77fbd676bc
3 files changed
+60
No files matched your search
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/caddy-vhosts/command-functions"
|
||||||
|
set -eo pipefail
|
||||||
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
trigger-caddy-pre-restore() {
|
||||||
|
declare desc="pre-restore the caddy proxy"
|
||||||
|
declare trigger="install"
|
||||||
|
|
||||||
|
if [[ ! -f "${DOKKU_LIB_ROOT}/data/caddy/caddy.started" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! cmd-caddy-start; then
|
||||||
|
dokku_log_warn "Failed to restore caddy proxy, requests may not route as expected"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
trigger-caddy-pre-restore "$@"
|
||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/command-functions"
|
||||||
|
set -eo pipefail
|
||||||
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
trigger-nginx-pre-restore() {
|
||||||
|
declare desc="pre-restore the nginx proxy"
|
||||||
|
declare trigger="install"
|
||||||
|
|
||||||
|
if [[ ! -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/nginx.started" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! cmd-nginx-start; then
|
||||||
|
dokku_log_warn "Failed to restore nginx proxy, requests may not route as expected"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
trigger-nginx-pre-restore "$@"
|
||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/traefik-vhosts/command-functions"
|
||||||
|
set -eo pipefail
|
||||||
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
trigger-traefik-pre-restore() {
|
||||||
|
declare desc="pre-restore the traefik proxy"
|
||||||
|
declare trigger="install"
|
||||||
|
|
||||||
|
if [[ ! -f "${DOKKU_LIB_ROOT}/data/traefik/traefik.started" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! cmd-traefik-start; then
|
||||||
|
dokku_log_warn "Failed to restore traefik proxy, requests may not route as expected"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
trigger-traefik-pre-restore "$@"
|
||||||
Reference in new issue
Block a user