Expand standalone documentation section service
paulausz opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
The current documentation section Deployment - Standalone states how to start the tool by running
python3 src/main.py
, but when doing so, it is required to have the command line open all the time. Otherwise, the tool stops.
Describe the solution you'd like
An extension on how to set up a service that runs the python script automatically may be added for a better user experience.
Describe alternatives you've considered
This is how I solved the issue on a Raspberry Pi
Create a new file
sudo nano /etc/systemd/system/suivibourse.service
Content
Description=Suivi-bourse Stock Monitoring
Documentation=https://suivibourse-docs.netlify.app/
After=network-online.target
[Service]
User=pi
Restart=on-failure
ExecStart=/usr/bin/python3 /home/pi/suivi-bourse/app/src/main.py
[Install]
WantedBy=multi-user.target
Enable the service
sudo systemctl enable suivibourse
Start the service
sudo systemctl start suivibourse
Check the status
sudo systemctl status suivibourse
I would suggest to extend the existing documentation :)
Hi,
Thanks for this issue ! I personally use nohup
command to run the app in background (with a cron entry at reboot) but your solution works too ! I will add a section to explain multiple ways to run the app in background. If you want, you can do a Pull Request with theses changes.