简体   繁体   中英

I run a production mode of play framework ,how to keep it running background

"./scorpio -Dhttp.port=10000 & "

在此处输入图片说明

doesn't work too enter image description here

I use "activator dist" to deploy my play project,and i start my application as the fisrt pic, ./scorpio -Dhttp.port=10000 -Dplay.evolutions.db.default.autoApply=true -Dplay.crypto.secret=QCY?Anfk?aZ?iwrNwnxIR6 how to start it so the application will run on background

It is not play related. It is about how to start any other java / shell application in the background.

It is already answered for example here: How to run a shell script in the background and get no output

As @Micahl mentioned it's not play related but any script running on linux. nohup is your friend. read more here

nohup ./scorpio -Dhttp.port=10000 >/dev/null 2>&1

make sure the application logging is configured properly to a file as the above command will redirect all stdout to /dev/null.

If you are running play app in production I am recommending to build a system package with sbt-native-packager . Builded packages use system level services to run app in background, have proper configuration and have convenient versioning tools.

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