-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
54 lines (45 loc) · 1.38 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
import Dependencies._
name := "http4s-mongo"
lazy val dockerSettings = Seq(
dockerfile in docker := {
// The assembly task generates a fat JAR file
val artifact: File = assembly.value
val artifactTargetPath = s"/app/${artifact.name}"
new Dockerfile {
from("openjdk")
add(artifact, artifactTargetPath)
expose(8080)
entryPoint("java", "-jar", artifactTargetPath)
}
}
)
lazy val common = (project in file("common"))
.settings(
Commons.settings,
libraryDependencies ++= commonDependencies
)
lazy val model = (project in file("model"))
.settings(
Commons.settings,
libraryDependencies ++= modelDependencies
).dependsOn(common)
lazy val core = (project in file("core"))
.settings(
Commons.settings,
libraryDependencies ++= coreDependencies
).dependsOn(model)
lazy val service = (project in file("service"))
.settings(
Commons.settings,
libraryDependencies ++= serviceDependencies,
mainClass in assembly := Some("server.Http4sMongoServer"),
parallelExecution in Test := false, // https://github.com/mockito/mockito/issues/1067
dockerSettings
).dependsOn(core % "compile->compile;test->test")
.enablePlugins(DockerPlugin)
lazy val root = (project in file("."))
.aggregate(common, model, core, service)
.settings(
Commons.settings
)
addCommandAlias("dockerize", ";clean;assembly;service/docker")