-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
assembly settings, cli.sh, Docker settings pulled out from Scorex(and…
… commented out dut to conflict with sbt-native-packager)
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
java -cp target/scala-2.11/lagonaki.jar scorex.api.client.ApiClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
// dockerize | ||
enablePlugins(DockerPlugin) | ||
// Make the docker task depend on the assembly task, | ||
// which generates a fat JAR file | ||
docker <<= docker.dependsOn(sbt.Keys.`package`.in(Compile, packageBin)) | ||
dockerfile in docker := { | ||
val jarFile = (assemblyOutputPath in assembly).value | ||
val jarTargetPath = s"/app/${jarFile.name}" | ||
val settingsPath = (baseDirectory in ThisBuild).value / "settings.json" | ||
new Dockerfile { | ||
from("frolvlad/alpine-oraclejdk8") | ||
// runRaw("apk --update add openjdk7-jre") | ||
// copy compiled jar into the container | ||
run("mkdir", "-p", "/app") | ||
copy(jarFile, jarTargetPath) | ||
// copy settings | ||
copy(settingsPath, "/app/settings.json") | ||
// persist data beyond the lifetime of a container session | ||
run("mkdir", "-p", "/tmp/scorex") | ||
volume("/tmp/scorex") | ||
// run scorex as: | ||
// /usr/bin/java -jar scorex.jar | ||
workDir("/app") | ||
run("/usr/bin/java", "-jar", jarTargetPath) | ||
} | ||
} | ||
// todo: name image | ||
imageNames in docker := Seq( | ||
ImageName(s"org.consensusresearch/starter") | ||
) | ||
// todo: can drop cache | ||
// buildOptions in docker := BuildOptions(cache = false) | ||
*/ |