Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I have a bitbucket pipeline file bitbucket-pipelines.yml which executes the file deploy.sh on my DO droplet each time a new commit is made to the main branch.
On DO, deploy.sh in turn calls pull.sh which performs a set of actions:
refgator-api.py process refgator-api.pypython3 refgator-api.pyIt’s at this last step that my bitbucket pipeline will continue executing (consuming all my build minutes).
Is there any way that I can run the file refgator-api.py and exiting the session whilst still allowing it to run?
I’ve attempted using nohup and & as well as exit. Neither result in a state where the pipeline disconnects from the DO droplet and stops and the application is running on the droplet.
image: atlassian/default-image:latest
pipelines:
default:
- step:
script:
- cat ./deploy.sh | ssh -tt root@xxx.xxx.xxx.xxx
- echo "Deploy step finished"
echo "Deploy Script Started"
cd
sh pull.sh
echo "Deploy script finished execution"
## Kills the current process which is restarted later
kill -9 $(pgrep -f refgator-api.py)
## And change to directory containing the repo
cd eg-api
## Pull from the repo
export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa.pub"
GIT_SSH_COMMAND="ssh -v" git pull git@bitbucket.org:myusername/myrepo.git
## Change to directory containing the python file to execute
cd refgator-api
python3 refgator-api.py &
ebeecroft
Noor Bakkal
384d3f11289345379905a243f7b817
IsaacMvd
Ervan Agus
Teckno
dc1bce8262314f84b368813178d9e4
gerard
gerard
Stan Flint