简体   繁体   中英

Gitlab CI Flask timeouts

I am trying to deploy a Flask webapp using gitlab CI.

In my script I launch the following command:

- if [[ "$STATUS" == "NOTRUN" ]] ; then eval "nohup flask run &" ; fi

The problem is that the webapp is deploying, but my gitlab CI timeouts after 1hour because it thinks the command is still running.

What do I have to add for it to succeed and not fail?

Thank you very much

Unfortunately it won't be so easy. There is similar issue on gitlab .

Process started with Runner, even if you add nohup and & at the end, is marked with process group ID. When job is finished Runner is sending kill signal to whole process group. So any process started directly from CI job will be terminated at job end. Using service manager you're not starting the process in context of Runner's job. Your only notifying a manager to start a process using prepared configuration

The only solution I know is to create some .service and run it with systemctl .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM