【问题标题】:Play Framework App on OpenShift在 OpenShift 上播放框架应用程序
【发布时间】:2016-04-24 07:50:20
【问题描述】:

我有一个 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 框架不需要墨盒。有什么建议吗?

【问题讨论】:

    标签: playframework openshift


    【解决方案1】:

    我终于找到了办法:

    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

    【讨论】:

      猜你喜欢
      • 2016-06-12
      • 2015-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-16
      • 2019-03-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多