Permalink
Browse files

Dockerize the app

  • Loading branch information...
ygunayer committed Apr 19, 2017
1 parent 12125c1 commit 649befacb6110ada9e8d616389a37902d9eaf23d
Showing with 10 additions and 3 deletions.
  1. +5 −0 Dockerfile
  2. +2 −0 build.sbt
  3. +2 −2 src/main/resources/application.conf
  4. +1 −1 src/main/scala/com/yalingunayer/bar/BarActor.scala
@@ -0,0 +1,5 @@
FROM java:8-jdk
WORKDIR /app
CMD ./bin/remote-bar
@@ -1,5 +1,7 @@
val akkaVersion = "2.5.0"
enablePlugins(JavaAppPackaging)
name := """remote-bar"""
version := "1.0"
@@ -9,8 +9,8 @@ akka {
remote {
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
hostname = "127.0.0.1"
port = 47001
hostname = "remote-bar"
port = 47000
}
log-sent-messages = on
log-received-messages = on
@@ -18,7 +18,7 @@ class BarActor extends Actor {
case s: String => println(f"Received a reply: $s")
}
context.system.actorSelection("akka.tcp://Foo@127.0.0.1:47000/user/foo").resolveOne()(10.seconds).onComplete(x => x match {
context.system.actorSelection("akka.tcp://Foo@remote-foo:47000/user/foo").resolveOne()(10.seconds).onComplete(x => x match {
case Success(ref: ActorRef) => {
println(f"Located Foo actor: $ref")
ref ! "Oh, hi Mark!"

0 comments on commit 649befa

Please sign in to comment.