diff --git a/build.sbt b/build.sbt index b85eeb6..f6f7eae 100644 --- a/build.sbt +++ b/build.sbt @@ -1,10 +1,13 @@ 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/" @@ -12,6 +15,26 @@ 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 ------------- // +// ------------------------------------------------ // + +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" \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 0000000..b674c64 --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "1.0.4") \ No newline at end of file diff --git a/src/main/scala/com/github/kliewkliew/cornucopia/redis/Connection.scala b/src/main/scala/com/github/kliewkliew/cornucopia/redis/Connection.scala index 0c089db..71ca46f 100644 --- a/src/main/scala/com/github/kliewkliew/cornucopia/redis/Connection.scala +++ b/src/main/scala/com/github/kliewkliew/cornucopia/redis/Connection.scala @@ -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.