FIN INIT
This commit is contained in:
45
systemd/myp-https.service
Normal file
45
systemd/myp-https.service
Normal file
@@ -0,0 +1,45 @@
|
||||
[Unit]
|
||||
Description=MYP Druckerverwaltung HTTP Backend (Port 5000)
|
||||
Documentation=https://github.com/MYP-Druckerverwaltung
|
||||
After=network.target network-online.target
|
||||
Wants=network-online.target
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory=/opt/myp
|
||||
# Vereinfachter Start-Befehl - startet direkt die Python-App im Produktionsmodus
|
||||
ExecStart=/usr/bin/python3 /opt/myp/app.py --production
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
StartLimitBurst=5
|
||||
StartLimitInterval=300
|
||||
|
||||
# Umgebungsvariablen für optimale Performance
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
Environment=FLASK_ENV=production
|
||||
Environment=FLASK_HOST=0.0.0.0
|
||||
Environment=FLASK_PORT=5000
|
||||
Environment=PYTHONPATH=/opt/myp
|
||||
Environment=LC_ALL=C.UTF-8
|
||||
Environment=LANG=C.UTF-8
|
||||
Environment=KIOSK_MODE=true
|
||||
Environment=USE_OPTIMIZED_CONFIG=true
|
||||
|
||||
# Logging-Konfiguration
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=myp-backend
|
||||
|
||||
# Sicherheitseinstellungen (gelockert für bessere Kompatibilität)
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=false
|
||||
ProtectSystem=false
|
||||
ReadWritePaths=/opt/myp
|
||||
ReadWritePaths=/var/log
|
||||
ReadWritePaths=/tmp
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user