Warm tip: This article is reproduced from stackoverflow.com, please click
node.js background continuous-integration gitlab

Make Nodejs script run in background in gitlab CI

发布于 2020-03-27 10:23:08

Our dev project start by command npm run serve Is it possible to run it on background mode? I tried to use nohup, & in end of string. It works properly in shell, but when it start by CI on Gitlab, pipeline state always is "running" cause npm output permanently shows on screen

Questioner
Nick
Viewed
244
Nicolas B. 2018-07-24 03:56

The clean way would be to run a container whose run command is "npm run serve"

I'm not certain running a non-blocking command through your pipeline is the right way but you should try using "&" "npm run serve" will run the command in "detached mode.