First Commit

This commit is contained in:
2026-05-19 14:32:46 +07:00
parent 73a8a01048
commit b3d162450d
20 changed files with 6543 additions and 2 deletions
+48
View File
@@ -0,0 +1,48 @@
[Unit]
Description=Frigate Counter Dashboard
Documentation=https://github.com/your-repo/frigate-counter
After=network-online.target frigate-counter.service
Wants=network-online.target
[Service]
Type=simple
User=frigate-counter
Group=frigate-counter
WorkingDirectory=/opt/frigate-counter
Environment="PATH=/opt/frigate-counter/venv/bin:/usr/local/bin:/usr/bin:/bin"
Environment="DB_PATH=/opt/frigate-counter/frigate_counter.db"
Environment="DASHBOARD_HOST=0.0.0.0"
Environment="DASHBOARD_PORT=5000"
Environment="FLASK_DEBUG=false"
# Use Gunicorn for production
ExecStart=/opt/frigate-counter/venv/bin/gunicorn \
-w 2 \
-b 0.0.0.0:5000 \
--access-logfile - \
--error-logfile - \
--capture-output \
--enable-stdio-inheritance \
dashboard:app
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStopSec=30
KillSignal=SIGTERM
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3
# Security hardening
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/frigate-counter
PrivateTmp=true
[Install]
WantedBy=multi-user.target