🎉 Added production setup documentation and scripts, improved firewall configuration, and updated systemd services for production environment. 🖥️🔒📡

This commit is contained in:
2025-06-10 12:33:55 +02:00
parent 7a4d7f6f65
commit 2e445d473d
9 changed files with 882 additions and 28 deletions

View File

@@ -1,8 +1,8 @@
[Unit]
Description=MYP Kiosk Browser Autostart (Chromium HTTPS) - Wartungsfreier Produktionsbetrieb
Documentation=https://github.com/MYP-Druckerverwaltung
After=graphical-session.target myp-https.service network-online.target
Wants=myp-https.service network-online.target
After=graphical-session.target myp-production.service network-online.target
Wants=myp-production.service network-online.target
Requires=graphical-session.target
StartLimitBurst=5
StartLimitInterval=600
@@ -33,17 +33,20 @@ ExecStartPre=/bin/bash -c '\
sleep 2; \
done; \
\
# Warte auf HTTP-Backend mit verbesserter Erkennung \
echo "🔍 Warte auf HTTP Backend..."; \
# Warte auf HTTPS-Backend (Port 443) \
echo "🔍 Warte auf HTTPS Backend (Port 443)..."; \
for i in {1..120}; do \
if curl -s --connect-timeout 3 --max-time 5 http://localhost:5000/api/kiosk/status >/dev/null 2>&1; then \
echo "✅ HTTP Backend erreichbar und API verfügbar"; \
if curl -k -s --connect-timeout 3 --max-time 5 https://localhost:443/api/kiosk/status >/dev/null 2>&1; then \
echo "✅ HTTPS Backend erreichbar und API verfügbar"; \
break; \
elif curl -s --connect-timeout 3 --max-time 5 http://localhost:5000 >/dev/null 2>&1; then \
echo "✅ HTTP Backend erreichbar"; \
elif curl -k -s --connect-timeout 3 --max-time 5 https://localhost:443 >/dev/null 2>&1; then \
echo "✅ HTTPS Backend erreichbar"; \
break; \
elif curl -k -s --connect-timeout 3 --max-time 5 https://localhost >/dev/null 2>&1; then \
echo "✅ HTTPS Backend erreichbar (Standard-Port)"; \
break; \
fi; \
echo "⏳ Warte auf Backend... ($i/120)"; \
echo "⏳ Warte auf HTTPS Backend... ($i/120)"; \
sleep 3; \
done; \
\
@@ -162,9 +165,9 @@ ExecStart=/bin/bash -c '\
--new-instance"; \
fi; \
\
# URL mit intelligenter Ermittlung \
# URL mit intelligenter Ermittlung (HTTPS-Only) \
TARGET_URL=$(/opt/myp/scripts/get_kiosk_url.sh); \
[ -z "$TARGET_URL" ] && TARGET_URL="http://localhost:5000"; \
[ -z "$TARGET_URL" ] && TARGET_URL="https://localhost"; \
\
# Browser starten mit Fehlerbehandlung \
echo "🖥️ Starte $BROWSER im Kiosk-Modus..."; \