-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
41 lines (30 loc) · 1.02 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
name := "stark"
organization := "se.marcuslonnberg"
version := "0.1.1-SNAPSHOT"
scalaVersion := "2.11.6"
libraryDependencies ++= Dependencies.all
resolvers ++= Dependencies.Resolvers.all
assemblyMergeStrategy in assembly := {
case PathList("org", "mockito", x @ _*) if x.lastOption.exists(_.endsWith(".class")) => MergeStrategy.first
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
Revolver.settings
Revolver.enableDebugging(port = 5005, suspend = false)
enablePlugins(DockerPlugin)
docker <<= (docker dependsOn assembly)
dockerfile in docker := {
val appFile = (assemblyOutputPath in assembly).value
val targetAppDir = "/srv/stark"
val targetAppPath = s"$targetAppDir/${name.value}.${appFile.ext}"
new Dockerfile {
from("dockerfile/java")
workDir(targetAppDir)
entryPointShell("java", "$JAVA_OPTIONS", "-jar", targetAppPath)
add(appFile, targetAppPath)
}
}
imageNames in docker := Seq(
ImageName("marcuslonnberg/" + name.value +":" + version.value)
)