java Play 框架应用部署

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5837034/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 13:02:18  来源:igfitidea点击:

Play Framework application deployment

javaweb-applicationsdeploymenthostingplayframework

提问by Mooh

it's been a long time working on a play app & now comes the time to deploye it. that my first time so i'm kind of lost. which hosting compagny is the best & offer good pricing ?

开发游戏应用程序已经很长时间了,现在是部署它的时候了。这是我的第一次,所以我有点迷茫。哪个托管公司是最好的并提供优惠的价格?

采纳答案by falinsky

You can look at this direction Heroku

你可以看这个方向 Heroku

回答by roshan

I'll probably post a detailed instruction of what I did, but here's a quick 2-min general idea.

我可能会发布我所做的详细说明,但这里有一个快速的 2 分钟总体思路。

Buy an Amazon Micro Instance Virtual Server (costs around $11/mo) with a debian squeeze (6.0) image

购买带有 debian 挤压 (6.0) 映像的 Amazon Micro Instance Virtual Server(费用约为 11 美元/月)

$> sudo apt-get install sun-java6-jdk6
$> sudo apt-get install mysql5
~: wget <playDownloadURL>
~: unzip *.zip
~: set path to java, play

sftp/scp your source code to /var/www/<yourApp>
$> cd /var/www/<yourApp>
$> play start 
~: (not actual commands but the concept)

and you are in business.

你在做生意。

回答by Benoit Courtine

The creator company of Play Framework, Zenexity, propose a hosting solution dedicated to Play applications: PlayApps

Play Framework 的创建者公司Zenexity提出了专用于 Play 应用程序的托管解决方案:PlayApps

It's probably the best choice since it is native Play hosting.

这可能是最好的选择,因为它是本地 Play 托管。



Otherwise, you can export your Play application as a classic war:

否则,您可以将您的 Play 应用程序导出为经典War:

play war yourapp -o yourapp.war

Then, this war can be deployed on every Java server (Tomcat, Glassfish, etc.). For hosting a Java application server, you'll probably need a dedicated or virtualized server.

那么,这个war就可以部署在每一个Java服务器上(Tomcat、Glassfish等)。为了托管 Java 应用程序服务器,您可能需要一个专用或虚拟化的服务器。



Another solution is to deploy your app on Google App Engine. But for that, you have to developp your Play application in a specific way. In particular, you can't use classic persistence. You have to use the Siena Play moduleto manage your entities for Google App Engine.

另一种解决方案是在Google App Engine上部署您的应用程序。但为此,您必须以特定方式开发您的 Play 应用程序。特别是,您不能使用经典持久性。您必须使用Siena Play 模块来管理您的 Google App Engine 实体。

I don't know if Play apps can easily be deployed on other cloud structures. Maybe on Cloud Foundrysince it supports Java application but I did not tested it and there are not deploy plugins yet for this platform.

不知道 Play 应用是否可以轻松部署在其他云结构上。也许在Cloud Foundry 上,因为它支持 Java 应用程序,但我没有对其进行测试,并且还没有为此平台部署插件。

回答by Ryan

Cloudbees, http://cloudbees.com, is an excellent choice. There is even a Play Framework Module for it.

Cloudbees,http://cloudbees.com,是一个很好的选择。甚至还有一个 Play Framework Module。

http://www.playframework.org/modules/cloudbees-0.1/home

http://www.playframework.org/modules/cloudbees-0.1/home

回答by Lawrence McAlpin

All of my Play! apps are hosted on Google App Engine, which is free for small sites. But you can host Play! apps on any Java web hosting provider.

我所有的游戏!应用程序托管在 Google App Engine 上,这对于小型网站是免费的。但是您可以主持 Play!任何 Java 网络托管提供商上的应用程序。

回答by opensas

In this question Experiences on free and low-cost hosting for play framework applications?

在这个问题中,是否有免费和低成本托管 Play 框架应用程序的经验?

there are several cloud options for play framework...

播放框架有几种云选项......

回答by svenkubiak

You could try Play! Manager. It's a Manager for Play Applications much like the Tomcat Manager. Worth trying:

你可以试试玩!经理。它是 Play 应用程序的管理器,很像 Tomcat 管理器。值得尝试:

https://github.com/mbarbieri/playmanager

https://github.com/mbarbieri/playmanager

回答by Codemwnci

There are a number of cloud hosting solutions supported by Play. There is a module for Stax, and the message boards have mentioned success on several others. A quick search for 'deploy' on the google groups will show a number of options.

Play 支持多种云托管解决方案。Stax 有一个模块,留言板提到了其他几个模块的成功。在 google 群组上快速搜索“部署”将显示许多选项。

I would recommend PlayApps though, It is actually hosted on Ghandi (i think!) and the pricing plan is the same, so the Zenexity guys actually make no money from this. They have set it up to be a convenience to us developers.

不过我会推荐 PlayApps,它实际上托管在 Gandi 上(我认为!)并且定价计划是相同的,所以 Zenexity 的人实际上没有从中赚钱。他们将其设置为方便我们开发人员。

GAE is an option, but it restricts what you can do with Play. The WAR file deployment option, allowing to deploy to any java servlet container is also an option, but adds the overhead and resource of the container unnecessarily, so again, not the best option.

GAE 是一种选择,但它限制了您可以使用 Play 执行的操作。WAR 文件部署选项,允许部署到任何 java servlet 容器也是一个选项,但不必要地增加了容器的开销和资源,所以同样不是最好的选择。

回答by opensas

Lately I've been playing around with openshift for hosting playframework application

最近我一直在玩 openshift 来托管 playframework 应用程序

It looks really good, you have mysql, phpmyadmin, mongodb, mongorock, jenkins, and what's even more important, you get 5 applications with 500MB op data space for each one... for free...

看起来真的不错,你有 mysql、phpmyadmin、mongodb、mongorock、jenkins,更重要的是,你得到 5 个应用程序,每个应用程序有 500MB 的操作数据空间......免费......

I'm also using this play module to ease deployment to openshift

我也在使用这个播放模块来简化部署到 openshift

https://github.com/opensas/openshift/blob/master/documentation/manual/home.textile

https://github.com/opensas/openshift/blob/master/documentation/manual/home.textile

have a look at these articles:

看看这些文章:

playlatam.wordpress.com

playlatam.wordpress.com

detailed github tutorial

详细的github教程

article found at openshift's site

在 openshift 的网站上找到的文章

回答by vlad_o

If anyone is interested on uploading on Linode please follow this thread.

如果有人对在 Linode 上上传感兴趣,请关注此线程。

Linode 512 and play! framework

Linode 512和玩!框架