Docker: allow controlling datastore backend via IPFS_CLUSTER_DATASTORE

This commit is contained in:
Hector Sanjuan 2021-06-29 15:44:24 +02:00
parent 55a6271c28
commit 74e4dfb2e4
4 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,7 @@ ENV GOPATH /go
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster
ENV IPFS_CLUSTER_CONSENSUS crdt
ENV IPFS_CLUSTER_DATASTORE leveldb
EXPOSE 9094
EXPOSE 9095

View File

@ -28,6 +28,7 @@ ENV GOPATH /go
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster
ENV IPFS_CLUSTER_CONSENSUS crdt
ENV IPFS_CLUSTER_DATASTORE leveldb
EXPOSE 9094
EXPOSE 9095

View File

@ -30,6 +30,7 @@ ENV GOPATH /go
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster
ENV IPFS_CLUSTER_CONSENSUS crdt
ENV IPFS_CLUSTER_DATASTORE leveldb
ENV IPFS_CLUSTER_RESTAPI_HTTPLISTENMULTIADDRESS /ip4/0.0.0.0/tcp/9094
ENV IPFS_CLUSTER_IPFSPROXY_LISTENMULTIADDRESS /ip4/0.0.0.0/tcp/9095

View File

@ -22,7 +22,7 @@ if [ -e "${IPFS_CLUSTER_PATH}/service.json" ]; then
else
echo "This container only runs ipfs-cluster-service. ipfs needs to be run separately!"
echo "Initializing default configuration..."
ipfs-cluster-service init --consensus "${IPFS_CLUSTER_CONSENSUS}"
ipfs-cluster-service init --consensus "${IPFS_CLUSTER_CONSENSUS}" --datastore "${IPFS_CLUSTER_DATASTORE}"
fi
exec ipfs-cluster-service $@