Skip to content
Cameron edited this page Dec 2, 2017 · 5 revisions

AkkaDisaster is the companion to FlaPyDisaster, running the calculations using a scala/akka-http server. The server is Dockerized as well, and support for Docker Swarm cluster is on the way.

Setup

Requirements

This is an sbt project, so Scala and SBT are the only prerequisites.

Compile and Run

To compile, clone the github repo and run

> sbt compile

This will download dependencies and compile the code. To start the server, run

> sbt run

Docker

To start the Docker container, run

> docker run -d -p 9001:9001 cliftbar/akkadisaster

The DockerHub repo is here.

Configuration

By default, the server listens on port 9001 and listens on 0.0.0.0 (which allows external connections). To change these, update application.conf with your desired values.

Development

IntelliJ works well as a development IDE, and is already set up in the .gitignore file. To use another IDE, make sure to update .gitignore so no IDE files get checked in.

IntelliJ Setup

  1. Clone Repo
  2. In IntelliJ, install the Scala plugin
  3. In IntelliJ, go toFile -> Project from Existing Source and select the github repo
  4. Make sure AkkaDisaster/src/main is added as a source root
  5. Add a new SBT Run Configuration, with a Task of Run and update the VM parameter -Xmx to 2048M (to deal with larger storms, change this if memory issues arise)
Clone this wiki locally