-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.sbt
54 lines (41 loc) · 1.33 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
name := "mqtt-mongo"
version := "1.1.0"
scalaVersion := "3.1.3"
organization := "izmailoff"
scalacOptions ++= Seq(
"-encoding", "utf8",
"-deprecation",
"-feature",
"-language:postfixOps",
"-language:implicitConversions",
// "-Xtarget:8",
"-unchecked",
"-indent",
)
enablePlugins(DockerPlugin)
//addDependencyTreePlugin
libraryDependencies ++= {
val akkaVersion = "2.6.19"
Seq(
// "com.typesafe.akka" %% "akka-actor" % akkaVersion,
"org.mongodb.scala" %% "mongo-scala-driver" % "4.6.1" cross CrossVersion.for3Use2_13,
"com.sandinh" %% "paho-akka" % "1.6.1",
// "com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"ch.qos.logback" % "logback-classic" % "1.2.11",
// "org.specs2" %% "specs2-core" % "4.16.1" % "test", // 5.0.2
// "com.github.fakemongo" % "fongo" % "2.1.1" % "test",
// "com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
// "org.scalatest" %% "scalatest" % "3.2.12" % "test"
)
}
docker / imageNames := Seq(ImageName(s"${organization.value}/${name.value}:${version.value}"))
docker / dockerfile := {
// The assembly task generates a fat JAR file
val artifact: File = assembly.value
val artifactTargetPath = s"/app/${artifact.name}"
new Dockerfile {
from("openjdk:8-jre")
add(artifact, artifactTargetPath)
entryPoint("java", "-jar", artifactTargetPath)
}
}