fix(nginx): Docker-DNS-Resolver gegen 502 nach API-Recreate, Deploy prueft Health inhaltlich
This commit is contained in:
@@ -51,7 +51,8 @@ sleep 5
|
||||
"$PLINK" -batch -hostkey "$HOSTKEY" -i "$KEY" -P "$PORT" "$SERVER" "
|
||||
docker ps --filter name=mp- --format 'table {{.Names}}\t{{.Status}}' &&
|
||||
curl -s https://mieterportal.hocks.eu/ | grep -o 'index-[^\"]*\.js' | head -1 &&
|
||||
curl -s https://mieterportal.hocks.eu/api/healthz
|
||||
curl -sf https://mieterportal.hocks.eu/api/healthz | grep -q '\"datenbank\":true' &&
|
||||
echo 'API erreichbar (Health OK)' || echo 'WARNUNG: API-Healthcheck fehlgeschlagen (nginx ggf. neu starten: docker restart mp-portal)'
|
||||
"
|
||||
echo
|
||||
echo "Fertig: https://mieterportal.hocks.eu"
|
||||
|
||||
@@ -9,6 +9,11 @@ server {
|
||||
gzip_types text/css application/javascript image/svg+xml application/json;
|
||||
gzip_min_length 1024;
|
||||
|
||||
# Docker-eigener DNS: Upstream-Namen bei jeder Anfrage neu auflösen.
|
||||
# Ohne das puffert nginx die Container-IP vom Start – nach einem Recreate
|
||||
# der API (neue IP) liefert jede Anfrage 502, bis nginx selbst neu startet.
|
||||
resolver 127.0.0.11 valid=10s;
|
||||
|
||||
# HTML nie cachen (Assets sind hash-benannt → ein Reload genügt)
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache" always;
|
||||
@@ -25,7 +30,8 @@ server {
|
||||
# NIE im Repo und NIE im Browser – der Endpunkt ist nur vom Server erreichbar.
|
||||
location = /api/mail/send {
|
||||
limit_except POST { deny all; }
|
||||
proxy_pass http://mp-mail-api:8080/send;
|
||||
set $mail_api http://mp-mail-api:8080;
|
||||
proxy_pass $mail_api/send;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Api-Token "${MAIL_API_TOKEN}";
|
||||
proxy_set_header X-Request-Source mieterportal-nginx;
|
||||
@@ -36,7 +42,8 @@ server {
|
||||
# Portal-API (Node/Express + PostgreSQL): Auth, Daten, Benachrichtigungen,
|
||||
# Dokumenten-Uploads/-Downloads (PDF bis 25 MB).
|
||||
location /api/ {
|
||||
proxy_pass http://mp-api:3000;
|
||||
set $portal_api http://mp-api:3000;
|
||||
proxy_pass $portal_api;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
|
||||
@@ -205,7 +205,12 @@ src/pages/Zaehler.tsx: VerlaufDialog (Liste neueste zuerst, Auffälligkeits-
|
||||
Badge, Löschen für Verwaltung), StandEintragenDialog (Mieter + Verwaltung,
|
||||
Warnbox bei Anomalie statt sofortigem Schließen), Anomalie-Badge auf der Karte.
|
||||
Achtung Git-Bash: Pfad-Argumente an node werden von MSYS umgewandelt –
|
||||
Pfade an node-Skripte OHNE führenden / übergeben.
|
||||
Pfade an node-Skripte OHNE führenden / übergeben. AUCH BEHOBEN: nginx
|
||||
pufferte Container-IPs beim Start → nach mp-api-Recreate lieferte jede API-
|
||||
Anfrage 502 (root cause mehrerer „schwarzer Bildschirm“-/Reload-Probleme).
|
||||
Fix: resolver 127.0.0.11 + Variablen-proxy_pass in
|
||||
docker/templates/default.conf.template; deploy.sh prüft Health jetzt inhaltlich
|
||||
(curl -sf + grep datenbank:true).
|
||||
|
||||
**Erledigt 04.10. (v1.24):** Anleitungsseite /anleitung (Seite „Anleitung" im
|
||||
Menü, sichtbar für Mieter und Verwaltung). Inhalte rollenbasiert in
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Netscape HTTP Cookie File
|
||||
# https://curl.se/docs/http-cookies.html
|
||||
# This file was generated by libcurl! Edit at your own risk.
|
||||
|
||||
#HttpOnly_mieterportal.hocks.eu FALSE / TRUE 1791152848 mp_session 97a602ba67b78b15c5e73bed11b39f5b5e8ad500c4227c44e9d17c68f2df2737
|
||||
@@ -0,0 +1,2 @@
|
||||
zr-1791124278944-zubgzl
|
||||
zr-1791124279087-8qlrvl
|
||||
@@ -0,0 +1 @@
|
||||
{"benutzername":"j.hinterstein","passwortHash":"c57a5df4f97ed6914116e5fd1348406064834f22503d890eb571af442ac4b4c3"}
|
||||
@@ -0,0 +1 @@
|
||||
{"stand":660,"standAm":"2026-10-04"}
|
||||
@@ -0,0 +1 @@
|
||||
{"stand":600,"standAm":"2026-10-04"}
|
||||
Reference in New Issue
Block a user