我正在编写一个脚本来部署一个play 2.2.1应用程序。但是我注意到在使用命令play“start 8084”运行应用程序后,应用程序运行在8084端口但是我必须执行cntrl + D才能退出记录并返回ubuntu中的命令promt。 有没有办法在不使用cntrl + d ....的情况下返回控制台,因为我必须使用shell脚本来执行此操作。
我也用过舞台。但我收到以下错误:
[error] Not a valid command: play (similar: apply, last, alias)
[error] Not a valid project ID: play
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: play (similar: clean)
[error] play
请帮忙
答案 0 :(得分:5)
我在playframework 2.2
中使用了类似的内容:
play dist
zip
存档解压缩到某处(它位于应用程序的target\universal
文件夹中)。起始脚本位于bin/<app_name>
bash /path/to/your/app/bin/<app_name> -Dhttp.port=8084 &
(注意最后的&符号)如果您打算使用ssh
,请考虑取消该流程或使用nohup
运行该流程(您可以在此处阅读详细信息:Scala start Play server in production),以便您在申请时不会关闭关闭ssh会话:
bash /path/to/your/app/bin/<app_name> -Dhttp.port=8084 & disown