Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Update the Play Framework projects to more recent version - #3849

Merged
NateBrady23 merged 1 commit into
TechEmpower:masterfrom
KoenDG:playframeworkupgrade2.6.15
Jun 12, 2018
Merged

NateBrady23 merged 1 commit into
TechEmpower:masterfrom
KoenDG:playframeworkupgrade2.6.15

Conversation

@KoenDG

@KoenDG KoenDG commented Jun 8, 2018

Copy link
Copy Markdown
Contributor

Update the configurations of the play framework to their current latest version: 2.6.15

Also update the dockerfiles to use a more recent base, allowing use of Scala 2.12.6 and sbt 1.1.5

Apart from that, I noticed some docker files providing extra JVM options. Considering these are all using the same framework, I feel either all dockerfiles should use it or non of them. Otherwise, the comparison between them is off.

Lastly, I added some code to the dockerfile to properly disable the http server that's not being used in the build that will be done by the dockerfile.
For instance: when running netty server, it's perfectly fine to disable the AkkaHttpPlugin. And vice versa. This prevents their jars from being put on the classpath.

…st version: 2.6.15

Also update the dockerfiles to use a more recent base, allowing use of Scala 2.12.6 and sbt 1.1.5

Apart from that, I noticed some docker files providing extra JVM options. Considering these are all using the same framework, I feel either all dockerfiles should use it or non of them. Otherwise, the comparison between them is off.

Lastly, I added some code to the dockerfile to properly disable the http server that's not being used in the build that will be done by the dockerfile.
For instance: when running netty server, it's perfectly fine to disable the AkkaHttpPlugin. And vice versa. This prevents their jars from being put on the classpath.

RUN sbt stage
CMD ["target/universal/stage/bin/play2-java-ebean-hikaricp", "-Dplay.server.provider=play.core.server.NettyServerProvider"]
CMD ["target/universal/stage/bin/play2-java-ebean-hikaricp", "-Dplay.server.provider=play.core.server.NettyServerProvider", "-J-server", "-J-Xms1g", "-J-Xmx1g", "-J-XX:NewSize=512m", "-J-XX:+UseG1GC", "-J-XX:MaxGCPauseMillis=30", "-J-XX:-UseBiasedLocking", "-J-XX:+AlwaysPreTouch"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this being used on 2 of the scala versions and nowhere else. So I added it everywhere. For comparison's sake, all configurations for the same framework should use the same parameters as much as possible.

@@ -1,5 +1,8 @@
FROM hseeberger/scala-sbt:8u151-2.12.5-1.1.2
FROM hseeberger/scala-sbt:8u171_2.12.6_1.1.5

@KoenDG KoenDG Jun 8, 2018 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most recent version of that image


# Whether the Netty wire should be logged
log.wire = false

@KoenDG KoenDG Jun 8, 2018 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to all application.conf files. Disabling a logging setting, as it's not needed. And then 2 settings which, according to the documentation, should have better performance/be more fair.

WORKDIR /play2
COPY play2-java-ebean-hikaricp .

RUN sed -i 's/.enablePlugins(PlayJava, PlayEbean, PlayNettyServer)/.enablePlugins(PlayJava, PlayEbean, PlayNettyServer).disablePlugins(PlayAkkaHttpServer)/g' build.sbt

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling server that isn't actually going to run, this is the netty dockerfile, netty is going to act as the http server here, not akka.

@KoenDG KoenDG changed the title Update the Play Framework to more recent version Update the Play Framework projects to more recent version Jun 12, 2018
@NateBrady23
NateBrady23 merged commit a21955a into TechEmpower:master Jun 12, 2018
@KoenDG
KoenDG deleted the playframeworkupgrade2.6.15 branch June 12, 2018 19:48
roberthusak pushed a commit to roberthusak/FrameworkBenchmarks that referenced this pull request Nov 6, 2018
…st version: 2.6.15 (TechEmpower#3849)

Also update the dockerfiles to use a more recent base, allowing use of Scala 2.12.6 and sbt 1.1.5

Apart from that, I noticed some docker files providing extra JVM options. Considering these are all using the same framework, I feel either all dockerfiles should use it or non of them. Otherwise, the comparison between them is off.

Lastly, I added some code to the dockerfile to properly disable the http server that's not being used in the build that will be done by the dockerfile.
For instance: when running netty server, it's perfectly fine to disable the AkkaHttpPlugin. And vice versa. This prevents their jars from being put on the classpath.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants