Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: docker build configuration #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
name := "cornucopia"
organization := "com.github.kliewkliew"

version := "1.1.2"
//version := "1.1.2"
version := "0.3-SNAPSHOT"

scalaVersion := "2.11.8"

enablePlugins(JavaAppPackaging, DockerPlugin)

resolvers += "Sonatype Releases" at "https://oss.sonatype.org/service/repositories/releases/"
resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies ++= Seq(
"biz.paluch.redis" % "lettuce" % "5.0.0.Beta1",
"org.scala-lang.modules" % "scala-java8-compat_2.11" % "0.8.0",
"com.typesafe.akka" %% "akka-stream-kafka" % "0.11-RC1",
"com.github.kliewkliew" %% "salad" % "0.11.01",
"com.github.kliewkliew" %% "salad" % "0.11.04",
"org.slf4j" % "slf4j-log4j12" % "1.7.22"
)

// ------------------------------------------------ //
// ------------- Docker configuration ------------- //
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let add a section to README.md.

// ------------------------------------------------ //

javaOptions in Universal ++= Seq(
"-Dconfig.file=etc/container.conf"
)

packageName in Docker := packageName.value

version in Docker := version.value

dockerBaseImage := "openjdk"

dockerRepository := Some("gcr.io/adenda-server-mongodb")

defaultLinuxInstallLocation in Docker := "/usr/local"

daemonUser in Docker := "root"
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "1.0.4")
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ object Connection {
private val redisClusterPort = redisClusterConfig.getInt("seed.server.port")
private val nodes = List(RedisURI.create(redisClusterSeedServer, redisClusterPort))

LoggerFactory.getLogger(this.getClass).debug(s"Cluster seed server: '${nodes}'")

/**
* Create a new API connection - new connections are necessary to refresh the view of the cluster topology
* after adding or removing a node.
Expand Down