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"
|
|
|
|
|
|
|
|
// Ensure actor system is shut down
|
|
|
|
// 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")
|
|
|
|
|
2021-09-09 16:13:24 -05:00
|
|
|
//make it so all users can execute the startup script
|
|
|
|
//for the oracle server
|
|
|
|
//this is needed for umbrel
|
|
|
|
//https://linuxize.com/post/chmod-command-in-linux/#symbolic-text-method
|
|
|
|
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")
|