974486bc53
Remove the Clay role (Claude Code web UI) and its Anthropic API key. New roles: - ollama: local CPU LLM (qwen3:4b-instruct), internal network only - browserless: headless Chromium for JavaScript-heavy pages - searxng: metasearch backend for the chat web_search tool - n8n at agent.ladkau.de: web chat (/chat), scheduled workflows, Telegram bot; workflows and credentials are imported from the repo Telegram bot: Gemini 3.8 -> Gemini 3.5 -> local Qwen fallback chain, /qwen to force the local model, /stocks and a weekday schedule (07:30, 13:00, 17:40) for the MTE.DE / PTX.F stock report. Also: dashboard and check-services entries for the chat, vault checks for the new secrets (n8n, SearXNG, Gemini, Telegram, SMTP), updated CLAUDE.md, runbooks and README.
65 lines
2.0 KiB
Bash
65 lines
2.0 KiB
Bash
#!/usr/bin/env bash
|
|
# Checks that all service endpoints are reachable and return the expected HTTP
|
|
# status code. Run this after provisioning, before configuring individual services.
|
|
# Usage: bash scripts/check-services.sh
|
|
|
|
set -uo pipefail
|
|
|
|
# "url expected_status timeout_seconds" tuples
|
|
# Nextcloud runs its first-time installation on the initial request (1-2 min),
|
|
# so it gets a much longer timeout than the other services.
|
|
CHECKS=(
|
|
"https://cloud.ladkau.de/dashboard/ 401 10"
|
|
"https://gitea.ladkau.de 200 10"
|
|
"https://nextcloud.ladkau.de 200 180"
|
|
"https://sso.ladkau.de/realms/master 200 10"
|
|
"https://mail.ladkau.de 200 10"
|
|
"https://cr.ladkau.de/v2/ 401 10"
|
|
"https://k8s.ladkau.de 200 10"
|
|
"https://vault.ladkau.de 200 10"
|
|
"https://dl.ladkau.de 200 10"
|
|
"https://agent.ladkau.de 401 10"
|
|
"https://agent.ladkau.de/chat 401 10"
|
|
)
|
|
|
|
if ! command -v curl &>/dev/null; then
|
|
echo "ERROR: curl not found — install with: apt install curl or brew install curl" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "==> Checking service endpoints"
|
|
|
|
FAILED=()
|
|
for check in "${CHECKS[@]}"; do
|
|
read -r url expected timeout <<< "$check"
|
|
|
|
if [ "$timeout" -gt 10 ]; then
|
|
printf " ... %s (first-run setup may take up to %d s)\n" "$url" "$timeout"
|
|
fi
|
|
|
|
actual=$(curl -sL -o /dev/null -w "%{http_code}" --max-time "$timeout" "$url" 2>/dev/null) || actual="000"
|
|
|
|
if [ "$actual" = "$expected" ]; then
|
|
printf " OK %s (%s)\n" "$url" "$actual"
|
|
else
|
|
printf " FAIL %s (expected %s, got %s)\n" "$url" "$expected" "$actual"
|
|
FAILED+=("$url")
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
|
|
if [ ${#FAILED[@]} -gt 0 ]; then
|
|
echo "ERROR: ${#FAILED[@]} endpoint(s) did not return the expected status:" >&2
|
|
for url in "${FAILED[@]}"; do
|
|
echo " - ${url}" >&2
|
|
done
|
|
echo "" >&2
|
|
echo " Check container status on the server: docker ps" >&2
|
|
echo " Check container logs: docker logs <container>" >&2
|
|
echo " Note: Keycloak and Nextcloud may take longer >90s on first boot — wait and retry." >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo " All services are reachable."
|