forked from janiskomuls/scala-bootcamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
38 lines (36 loc) · 1.51 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
val Http4sVersion = "0.21.16"
val CirceVersion = "0.13.0"
val MunitVersion = "0.7.20"
val LogbackVersion = "1.2.3"
val MunitCatsEffectVersion = "0.13.0"
lazy val root = (project in file("."))
.settings(
organization := "com.example",
name := "docker-example",
version := "0.0.1-SNAPSHOT",
scalaVersion := "2.13.4",
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-blaze-server" % Http4sVersion,
"org.http4s" %% "http4s-blaze-client" % Http4sVersion,
"org.http4s" %% "http4s-circe" % Http4sVersion,
"org.http4s" %% "http4s-dsl" % Http4sVersion,
"io.circe" %% "circe-generic" % CirceVersion,
"org.scalameta" %% "munit" % MunitVersion % Test,
"org.typelevel" %% "munit-cats-effect-2" % MunitCatsEffectVersion % Test,
"ch.qos.logback" % "logback-classic" % LogbackVersion,
),
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3"),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"),
docker / dockerfile := {
// The assembly task generates a fat JAR file
val artifact: File = assembly.value
val artifactTargetPath = s"/app/${artifact.name}"
new Dockerfile {
from("adoptopenjdk/openjdk15")
add(artifact, artifactTargetPath)
entryPoint("java", "-jar", artifactTargetPath)
expose(8080)
}
},
testFrameworks += new TestFramework("munit.Framework")
).enablePlugins(DockerPlugin)