Riffing on a previous post about doing continuous deployment to Elastic Beanstalk, I just did a setup to get Play Framework to deploy to Elastic Beanstalk.
Basically, the crux of it is to use a plugin that builds WAR files for Play. To accomplish this, I used https://github.com/play2war/play2-war-plugin. The plugin has you update the version number and it builds the WAR based on that name, but that gets weird for doing deployment from the same location. I modified the instructions and used this in build.sbt:
version := "latest"
After that, it was just running the following:
sbt war pip install awscli aws s3 cp project-latest.war s3://BUCKET/PATH/git-`git rev-parse --short HEAD`.zip --region "REGION" aws elasticbeanstalk create-application-version --application-name "APPLICATION NAME" --version-label `git rev-parse --short HEAD` --source-bundle S3Bucket="BUCKET",S3Key="PATH/git-`git rev-parse --short HEAD`.zip" --region "REGION" aws elasticbeanstalk update-environment --environment-name "ENVIRONMENT NAME" --version-label `git rev-parse --short HEAD` --region "REGION"
And that’s really it.
There’s now a better way to deploy Playframework apps to Elastic Beanstalk using the Java SE containers. Here’s a tutorial that walks you through preparing your Play! app for deployment using the standard “`activator dist“` command: https://www.davemaple.com/articles/deploy-playframework-elastic-beanstalk-jenkins/
Хай… Я просто хотел сказать, что информация, представленная на вашем интернет-сайте – просто превосходна;) Я обязательно вернусь на
вашу страницу в обозримом будущем;)