Add FeWo Docker deployment and expand report themes

This commit is contained in:
2026-06-26 08:37:19 +00:00
parent 61a53e723e
commit 3a2f03d02e
7 changed files with 343 additions and 1 deletions
+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/env bash
set -Eeuo pipefail
TARGET_DIR="${TARGET_DIR:-/srv/docker/monthly-report-kit}"
N8N_CONTAINER="${N8N_CONTAINER:-n8n}"
POSTGRES_CONTAINER="${POSTGRES_CONTAINER:-infra-postgres}"
POSTGRES_DATABASE="${POSTGRES_DATABASE:-fewomonitor}"
POSTGRES_ADMIN_USER="${POSTGRES_ADMIN_USER:-postgres}"
[[ -f "$TARGET_DIR/.env" ]] || {
echo "FEHLER: $TARGET_DIR/.env fehlt" >&2
exit 1
}
set -a
# shellcheck disable=SC1090
source "$TARGET_DIR/.env"
set +a
TEST_HOST="$REPORT_RENDERER_BIND_IP"
case "$TEST_HOST" in
0.0.0.0|"::"|"[::]")
TEST_HOST="127.0.0.1"
;;
esac
echo "1/5 Compose-Status"
(
cd "$TARGET_DIR"
docker compose ps
)
echo
echo "2/5 Gotenberg-Plattform"
docker image inspect "$GOTENBERG_IMAGE" \
--format 'Image: {{.Os}}/{{.Architecture}}'
echo
echo "3/5 Lokaler Renderer-Healthcheck"
curl -fsS \
"http://${TEST_HOST}:${REPORT_RENDERER_PORT}/health"
echo
echo
echo "4/5 Zugriff aus dem n8n-Container"
docker exec "$N8N_CONTAINER" node -e "
fetch('http://report-renderer:8080/health')
.then(async response => {
if (!response.ok) {
throw new Error('HTTP ' + response.status);
}
console.log(await response.text());
})
.catch(error => {
console.error(error);
process.exit(1);
});
"
echo
echo "5/5 Reporting-Tabellen"
docker exec "$POSTGRES_CONTAINER" \
psql \
-U "$POSTGRES_ADMIN_USER" \
-d "$POSTGRES_DATABASE" \
-c '\dt public.report_customer_config' \
-c '\dt public.monthly_report_runs'