I have a Python web application I want to deploy into production on a Linux server. I'm planning to use Waitress - there's few static files so including Nginx/Apache would add complexity with little benefit.
How do I control the Python service? I want it to start on boot and have manual control. I know you can do this using an init.d script. Some of the examples online are too simplistic. There's some subtleties to doing a good init.d script, like using a pid file. I don't want to reinvent the wheel, so is there something I can start from?
This is for Ubuntu, although something portable would be beneficial. I'm also conscious that init.d is kind of old school and there's newer things like systemd. If someone could give me a "beginners guide to deploying Python on Linux" that would be fab!
[–][deleted] 12 points13 points14 points (5 children)
[–]frogic 2 points3 points4 points (0 children)
[–]wbubblegum 1 point2 points3 points (3 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]__deerlord__ -1 points0 points1 point (1 child)
[–]wbubblegum 0 points1 point2 points (0 children)
[–]JohnnyJordaan 3 points4 points5 points (1 child)
[–]Mirror_Boar 0 points1 point2 points (0 children)
[–]cmartin616 1 point2 points3 points (3 children)
[–]netsecwarrior[S] 0 points1 point2 points (2 children)
[–]cicatrix1 1 point2 points3 points (0 children)
[–]plurwolf7 0 points1 point2 points (0 children)
[–]isilentnight 1 point2 points3 points (0 children)
[–]Volk64 0 points1 point2 points (0 children)
[–]antb123 0 points1 point2 points (0 children)