I am trying to do a CI script on GitLab where it connects to my VPS, Git Pulls and then runs the python script and exits, while leaving my python script running 24/7 (until the next pipeline run/commit).
How do I do get it do make my python script run 24/7?
script:
- 'apt-get update -y && apt-get install openssh-client -y && apt-get install sshpass -y '
- sshpass -p "password" ssh -o StrictHostKeyChecking=no root@host "cd repo/ && git pull && python3 main.py"
This is my current script, however, when main.py is run, the pipeline is left in limbo since the script is eternally running.
How do I make it so the pipeline script runs the script and exits, leaving it on tmux or something like that?