41 lines
1.0 KiB
Desktop File
41 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=FluxIP Lightsail IP rotation controller
|
|
Documentation=file:/opt/fluxip/README.md
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=fluxip
|
|
Group=fluxip
|
|
WorkingDirectory=/opt/fluxip
|
|
EnvironmentFile=/etc/fluxip/fluxip.env
|
|
Environment=PYTHONDONTWRITEBYTECODE=1
|
|
Environment=PYTHONUNBUFFERED=1
|
|
ExecStart=/opt/fluxip/.venv/bin/python -m uvicorn app.main:app --host 127.0.0.1 --port 8787 --workers 1 --proxy-headers --forwarded-allow-ips=127.0.0.1
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
TimeoutStopSec=30s
|
|
KillSignal=SIGTERM
|
|
UMask=0077
|
|
|
|
StateDirectory=fluxip fluxip-secrets
|
|
StateDirectoryMode=0700
|
|
ReadWritePaths=/var/lib/fluxip /var/lib/fluxip-secrets
|
|
NoNewPrivileges=true
|
|
PrivateDevices=true
|
|
PrivateTmp=true
|
|
ProtectClock=true
|
|
ProtectControlGroups=true
|
|
ProtectHome=true
|
|
ProtectKernelLogs=true
|
|
ProtectKernelModules=true
|
|
ProtectKernelTunables=true
|
|
ProtectSystem=strict
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
RestrictSUIDSGID=true
|
|
LockPersonality=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|