Add default exposed volume of /bitcoin-s so we can always write data to a place (#4669)

This commit is contained in:
Chris Stewart 2022-08-25 14:12:46 -05:00 committed by GitHub
parent 85a0a0b889
commit 15032e27a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -23,11 +23,11 @@ services:
- walletserver
walletserver:
image: bitcoinscala/bitcoin-s-server:latest
entrypoint: ["/opt/docker/bin/bitcoin-s-server", "--datadir", "/wallet", "--conf", "/opt/docker/docker-application.conf"]
entrypoint: ["/opt/docker/bin/bitcoin-s-server", "--datadir", "/bitcoin-s", "--conf", "/opt/docker/docker-application.conf"]
user: "0:1000"
restart: on-failure
volumes:
- ./data/wallet:/wallet
- ./data/wallet:/bitcoin-s
environment:
BITCOIN_S_NODE_MODE: "neutrino"
BITCOIN_S_NODE_PEERS: "neutrino.suredbits.com:8333"

View File

@ -3,7 +3,7 @@ import com.typesafe.sbt.SbtNativePackager.Docker
import com.typesafe.sbt.SbtNativePackager.autoImport.packageName
import java.nio.file.Paths
import com.typesafe.sbt.packager.Keys.{daemonUser, daemonUserUid, dockerAlias, dockerAliases, dockerCommands, dockerRepository, dockerUpdateLatest, maintainer}
import com.typesafe.sbt.packager.Keys.{daemonUser, daemonUserUid, dockerAlias, dockerAliases, dockerCommands, dockerExposedVolumes, dockerRepository, dockerUpdateLatest, maintainer}
import com.typesafe.sbt.packager.archetypes.jlink.JlinkPlugin.autoImport.JlinkIgnore
import com.typesafe.sbt.packager.docker.{Cmd, DockerChmodType}
import com.typesafe.sbt.packager.docker.DockerPlugin.autoImport.{dockerAdditionalPermissions, dockerBaseImage}
@ -200,9 +200,8 @@ object CommonSettings {
Docker / daemonUserUid := Some("1000"),
Docker / packageName := packageName.value,
Docker / version := version.value,
dockerCommands ++= Seq(
Cmd("RUN", "mkdir", "/wallet")
),
//add a default exposed volume of /bitcoin-s so we can always write data here
dockerExposedVolumes += "/bitcoin-s",
dockerUpdateLatest := isSnapshot.value
)
}