简体   繁体   English

我运行游戏框架的生产模式,如何保持其运行背景

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

"./scorpio -Dhttp.port=10000 & " “ ./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 我使用“激活程序dist”部署我的游戏项目,并以第一个图片启动应用程序。/ scorpio -Dhttp.port = 10000 -Dplay.evolutions.db.default.autoApply = true -Dplay.crypto.secret = QCY?Anfk?aZ?iwrNwnxIR6如何启动它,因此应用程序将在后台运行

It is not play related. 它与游戏无关。 It is about how to start any other java / shell application in the background. 它是关于如何在后台启动任何其他Java / shell应用程序。

It is already answered for example here: How to run a shell script in the background and get no output 例如,已经在这里得到解答: 如何在后台运行Shell脚本并且不获取任何输出

As @Micahl mentioned it's not play related but any script running on linux. 正如@Micahl所提到的,它与游戏无关,但与在Linux上运行的任何脚本无关。 nohup is your friend. nohup是你的朋友。 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. 确保将应用程序日志记录正确配置到文件,因为上述命令会将所有标准输出重定向到/ dev / null。

If you are running play app in production I am recommending to build a system package with sbt-native-packager . 如果您正在生产中运行play app,建议您使用sbt-native-packager构建系统软件包。 Builded packages use system level services to run app in background, have proper configuration and have convenient versioning tools. 生成的软件包使用系统级服务在后台运行应用程序,具有正确的配置和便捷的版本控制工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在后台运行开发模式中的play框架 - Running the play framework in development mode in the background 如何在Heroku上以开发模式运行Play Framework 2应用程序? - How do I run a Play Framework 2 app in dev mode on Heroku? 如何仅在开发模式下在 HTTPS 中运行 Play 框架? - How can I run Play framework in HTTPS only in the dev mode? 使用Play Framework 1.x,如何让JPA在生产模式下创建缺少的数据库表? - Using Play Framework 1.x, how do I get JPA to create missing DB tables in production mode? 如何调试不在调试模式下工作的Play框架程序? - How to debug a Play framework program that works in debug mode not in production? Play Framework在生产模式下不适用Evolution - Play Framework does not apply Evolutions in Production mode 如何在生产模式下运行GWT - How to run GWT in production mode 如何在开发人员模式下而非生产环境中调用默认错误页面(Play Framework 2.3.4-Java) - How to call default error pages in dev mode but not production (Play Framework 2.3.4 - Java) 如何保持后台服务始终在后台运行 - How do I keep Background Service always run in background 如何在生产中处理Play Framework 2数据库演变 - How to handle Play Framework 2 database evolutions in production
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM