2021-09-09 16:13:24 -05:00
|
|
|
import com.typesafe.sbt.packager.docker.DockerChmodType
|
|
|
|
|
2020-10-03 15:24:02 -05:00
|
|
|
name := "bitcoin-s-oracle-server"
|
|
|
|
|
2022-06-16 17:08:06 -05:00
|
|
|
Universal / packageName := CommonSettings.buildPackageName((Universal /packageName).value)
|
|
|
|
|
|
|
|
// Ensure actor system is shut down
|
2020-10-03 15:24:02 -05:00
|
|
|
// when server is quit
|
|
|
|
Compile / fork := true
|
|
|
|
|
2021-03-31 15:04:30 -05:00
|
|
|
libraryDependencies ++= Deps.oracleServer.value
|
2020-10-03 15:24:02 -05:00
|
|
|
|
2020-10-08 07:17:48 -05:00
|
|
|
mainClass := Some("org.bitcoins.oracle.server.OracleServerMain")
|
2020-10-03 15:24:02 -05:00
|
|
|
|
|
|
|
packageSummary := "A DLC Oracle"
|
|
|
|
|
|
|
|
packageDescription := "A basic DLC oracle that allows you to commit to events and sign them"
|
|
|
|
|
2021-02-18 10:03:19 -06:00
|
|
|
dockerExposedPorts ++= Seq(9998)
|
|
|
|
|
2021-02-26 07:35:20 -06:00
|
|
|
dockerEntrypoint := Seq("/opt/docker/bin/bitcoin-s-oracle-server")
|
|
|
|
|
2022-08-29 10:38:50 -05:00
|
|
|
//so the server can be read and executed by all users
|
|
|
|
dockerAdditionalPermissions += (DockerChmodType.Custom("a=rx"),"/opt/docker/bin/bitcoin-s-oracle-server")
|
|
|
|
|
2021-02-26 07:35:20 -06:00
|
|
|
//this passes in our default configuration for docker
|
|
|
|
//you can override this by passing in a custom conf file
|
|
|
|
//when the docker container is started by using bind mount
|
|
|
|
//https://docs.docker.com/storage/bind-mounts/#start-a-container-with-a-bind-mount
|
|
|
|
dockerCmd ++= Seq("--conf", "/opt/docker/docker-application.conf")
|