-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
57 lines (51 loc) · 2.23 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name := """re-teach.me"""
organization := "com.brianwtracey"
version := "1.0"
lazy val root = (project in file(".")).enablePlugins(PlayScala, AshScriptPlugin)
scalaVersion := "2.13.7"
libraryDependencies += guice
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "5.0.0" % Test
libraryDependencies ++= Seq(
// Enable reactive mongo for Play 2.8
"org.reactivemongo" %% "play2-reactivemongo" % "0.20.13-play28",
// Provide JSON serialization for reactive mongo
"org.reactivemongo" %% "reactivemongo-play-json-compat" % "1.0.1-play28",
// Provide BSON serialization for reactive mongo
"org.reactivemongo" %% "reactivemongo-bson-compat" % "0.20.13",
// Provide JSON serialization for Joda-Time
"com.typesafe.play" %% "play-json-joda" % "2.9.2",
// Bootstrap webjar
"org.webjars" % "bootstrap" % "5.1.1",
// Bootstrap forms
"com.adrianhurt" %% "play-bootstrap" % "1.6.1-P28-B4",
)
// allow docker to write to working directory of container
import com.typesafe.sbt.packager.docker._
import com.typesafe.sbt.packager.docker.DockerPermissionStrategy.CopyChown
dockerChmodType := DockerChmodType.UserGroupWriteExecute
dockerPermissionStrategy := CopyChown
// other Docker details
Docker / maintainer := "brian@brianwtracey.com"
Docker / packageName := "re-teach.me"
dockerBaseImage := "openjdk:8-jre-alpine"
dockerExposedPorts := Seq(9000)
// re-order existing docker commands so apk commands run before other parts of the build
dockerCommands := dockerCommands.value.flatMap {
case cmd @ Cmd("FROM", _) =>
Seq(
cmd,
Cmd("USER", "root"),
ExecCmd("COPY", "rds-truststore.jks", "/certs/rds-truststore.jks")
// ExecCmd("RUN", "apk", "update", "&&",
// "apk", "upgrade",
// "&&", "apk", "--no-cache", "add", "curl", "openssl", "perl"),
// ExecCmd("COPY", "import_documentdb_certs.sh", "/certs/import_documentdb_certs.sh"),
// ExecCmd("RUN", "chmod", "+x", "/certs/import_documentdb_certs.sh"),
// ExecCmd("RUN", "/certs/import_documentdb_certs.sh")
)
case other => Seq(other)
}
// Adds additional packages into Twirl
//TwirlKeys.templateImports += "com.brianwtracey.controllers._"
// Adds additional packages into conf/routes
// play.sbt.routes.RoutesKeys.routesImport += "com.brianwtracey.binders._"