Play Framework App on OpenShift



我有一个OpenShift帐户,我正在试用。我有一个使用Play框架构建的Scala Web应用程序。我现在想将此应用程序部署到我通过免费试用版 OpenShift 创建的墨盒中。如果我通过 ssh 进入 OpenShift 帐户,我会在家里得到以下信息:

drwxr-xr-x.  4   62 Apr 24 02:21 app-deployments
drwxr-xr-x.  5 root                     4096 Apr 24 02:17 app-root
drwxr-xr-x.  2 root                     root                       85 Apr 24 02:22 gear-registry
drwxr-xr-x.  3 root                     root                       23 Apr 24 02:18 git
drwxr-xr-x. 10 4096 Apr 24 02:19 haproxy
drwxr-xr-x.  8   95 Apr 24 02:17 play2

我克隆了 Cartridge 附带的远程 git 存储库,它包含虚拟游戏框架结构。我肯定可以将我的东西合并到这个结构中。但是如何构建和启动服务器。

更好的是不使用墨盒,因为启动 Play 框架不需要墨盒。有什么建议吗?

我终于找到了一种方法:

1. Play dist - this would create the zip file in target/universal/
2. Copy the zip file to my git repo and push this file to the server using git push
3. Change the PLAY2_APPLICATION_PATH variable in ~/.profile in the server and point it to the zip file that I uploaded to the server

有关更多参考,这里是链接:

https://github.com/tyrcho/openshift-cartridge-play2

最新更新