Deploying a tar file from CI to heroku

时间:2015-06-15 15:20:42

标签: heroku playframework

I have a play application for my website. Currently, codeship builds it, and heroku deploys it once the build succeeds. The problem is that since the project has become too big, heroku is not able to build it within 15 minutes while codeship can still build it in less than 6 minutes. The second problem is that heroku needlessly re-builds the entire application. This requires us to maintain and configure two different build environments. What I want to do is:

  • Codeship builds a .tar.gz.
  • The .tar.gz is pushed to heroku (we have an artifactory server, so maybe I can push it there for deployments?)
  • Heroku unpacks the .tar.gz and runs a script (at a known location) to start the server.

Things that I have considered but won't work:

  • Deploying as a WAR. Even though play does build to a war which can be deployed, it needlessly adds a tomcat layer on top and reduces the performance.
  • Deploying via S3. Since the .tar.gz has to be deployed somewhere, we though of S3, but there are just too many edge cases to be worked out for.

1 个答案:

答案 0 :(得分:2)

您可以使用Heroku SBT插件https://devcenter.heroku.com/articles/deploying-scala-and-play-applications-with-the-heroku-sbt-plugin。对于需要很长时间编译或需要从Travis CI或Jenkins等持续集成服务器部署的应用程序,这可能是首选方法。