Files
LerNotaFiscal/deploy/lernotafiscal.service

22 lines
496 B
Desktop File

[Unit]
Description=Lernotafiscal (FastAPI/Uvicorn)
After=network.target
[Service]
Type=simple
User=lernotafiscal
Group=lernotafiscal
WorkingDirectory=/opt/lernotafiscal
EnvironmentFile=/opt/lernotafiscal/.env
ExecStart=/opt/lernotafiscal/.venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8000 --workers 2
Restart=on-failure
RestartSec=3
# Hardening básico
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ReadWritePaths=/opt/lernotafiscal/data
[Install]
WantedBy=multi-user.target