-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
62 lines (47 loc) · 1.58 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
58
59
60
61
name := "macvendor"
version := "0.2.0"
organization := "danielgrigg"
scalaVersion := "2.11.8"
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8")
resolvers += Resolver.sonatypeRepo("releases")
resolvers += Resolver.sonatypeRepo("public")
libraryDependencies ++= {
val akkaV = "2.4.16"
val scalaTestV = "2.2.5"
val akkaHttpV = "10.0.3"
Seq(
"com.github.scopt" %% "scopt" % "3.5.0",
"com.typesafe.akka" %% "akka-actor" % akkaV,
"com.typesafe.akka" %% "akka-stream" % akkaV,
"com.typesafe.akka" %% "akka-http-core" % akkaHttpV,
"com.typesafe.akka" %% "akka-http" % akkaHttpV,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpV,
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpV,
"org.scala-lang" % "scala-reflect" % "2.11.8",
"org.scala-lang.modules" %% "scala-xml" % "1.0.4",
"org.scalatest" %% "scalatest" % scalaTestV % "test"
)
}
enablePlugins(DockerPlugin)
dockerfile in docker := {
val artifact: File = assembly.value
val artifactTargetPath = s"/app/${artifact.name}"
new Dockerfile {
from("java")
add(artifact, artifactTargetPath)
entryPoint("java", "-jar", artifactTargetPath)
expose(8080)
copy(baseDirectory.value / "oui.csv", "/")
}
}
imageNames in docker := Seq(
// Sets the latest tag
ImageName(s"${organization.value}/${name.value}:latest"),
// Sets a name with a tag that contains the project version
ImageName(
namespace = Some(organization.value),
repository = name.value,
tag = Some("v" + version.value)
)
)
buildOptions in docker := BuildOptions(cache = false)