Created using s2i v1.1.7
Create the s2i image with
#! SBT_VERSION=0.13.16 SCALA_VERSION=2.12.3 make
build an image tagged as image-name
s2i build <path / url> sbt-s2i <image-name>
SBT_SUBPROJECT
; optional string that specifies the sbt subproject to build in (not needed if not multi-project)plugins.sbt
; contains default set of sbt plugins that will be cached during the image build
An OpenShift Imagestream is provided that can be used in the OpenSHift console to build applications using this s2i image. To use it, simply add it as follows:
oc create -f sbt.yml
Note the openshift user must have rights to the openshift namespace (i.e. a cluster admin).
All of these settings can be configured in the scala project application.conf file
- Set the PID ID to null
play.server.pidfile.path=/dev/null
- Set a Play Secret Key.
play.http.secret.key="QCY?tAnfk?aZ?iwrNwnxIlR6CTf:G3gf:90Latabg@5241AB`R5W:1uDFN];Ik@n"
This should be a OCP ENV Secret at some point.
- Set the filters host. The code below will allow any host to access the project
play.filters.hosts {
allowed = ["."]
}
Some times checking out this project in windows will cause ^M characters to appear on the s2i/bin git bash files cause a error while trying to run the assembly command.
If that happens clean up the s2i/bin files by running
sed -e "s/^M//" filename > newfilename