Implement shared Caddy setup with initializing and unavailable pages for various apps
- Refactor domain scripts for Ghost, Gitea, Jellyfin, Metabase, n8n, NocoDB, Open WebUI, OpenClaw, PicoClaw, Plausible, Signoz, Uptime Kuma, and Vaultwarden to utilize a common Caddy setup script. - Introduce `caddy-setup.sh` for managing Caddy configurations and handling app initialization states. - Create `initializing.html` and `unavailable.html` pages to provide user feedback during app deployment and downtime. - Update domain handling logic to ensure seamless transitions between initializing and operational states. - Enhance user experience by providing visual indicators for app status during setup and maintenance.
This commit is contained in:
@@ -54,20 +54,6 @@ sed -i \
|
||||
"${COMPOSE_FILE}"
|
||||
sed -i "s/\"8080:8080\"/\"127.0.0.1:${APP_UPSTREAM_PORT}:8080\"/" "${COMPOSE_FILE}"
|
||||
|
||||
docker compose -f "${COMPOSE_FILE}" up -d
|
||||
|
||||
start_time="$(date +%s)"
|
||||
while true; do
|
||||
if curl -fsS "http://127.0.0.1:${APP_UPSTREAM_PORT}" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [ $(( $(date +%s) - start_time )) -ge 900 ]; then
|
||||
echo "ERPNext did not become ready in time" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
done
|
||||
|
||||
bash "${SCRIPT_DIR}/domain.sh" "${DOMAIN}"
|
||||
|
||||
docker compose -f "${COMPOSE_FILE}" up -d
|
||||
|
||||
Reference in New Issue
Block a user