togethere.cloud/api/systemd/togethere-file-api.service

24 lines
598 B
Desktop File

[Unit]
Description=Togethere File API (FastAPI/uvicorn)
After=network.target
[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/var/www/togethere.cloud/api
EnvironmentFile=/var/www/togethere.cloud/api/.env
ExecStart=/var/www/togethere.cloud/api/venv/bin/uvicorn main:app --host 127.0.0.1 --port 8001 --workers 2
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal
# Zabezpieczenia systemd
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ReadWritePaths=/var/www/togethere.cloud/files
[Install]
WantedBy=multi-user.target