diff --git a/systemd.ini b/systemd.ini new file mode 100644 index 0000000..0b4ea42 --- /dev/null +++ b/systemd.ini @@ -0,0 +1,17 @@ +[Unit] +Description=YT Player +After=network.target + +[Service] +User=ubuntu +WorkingDirectory=/home/ubuntu/ytplayer +EnvironmentFile=/home/ubuntu/ytplayer/.env +ExecStart=/home/ubuntu/ytplayer/venv/bin/uvicorn app:app \ + --host 0.0.0.0 \ + --port 5000 \ + --workers 4 \ + --loop asyncio +Restart=always +RestartSec=5 +[Install] +WantedBy=multi-user.target \ No newline at end of file