diff --git a/Dockerfile b/Dockerfile index fa291954..1a4f3b0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG ARCH=amd64 -FROM golang:1.16-alpine3.14 AS build-container +FROM golang:1.17-buster AS build-container ARG ARCH ENV GO111MODULE=on @@ -37,4 +37,4 @@ VOLUME ["/root/.lbcd"] EXPOSE 9245 9246 -ENTRYPOINT ["lbcd"] +ENTRYPOINT ["/app/run.sh"] diff --git a/config.go b/config.go index e8c11a8a..b803358c 100644 --- a/config.go +++ b/config.go @@ -956,35 +956,6 @@ func loadConfig() (*config, []string, error) { cfg.RPCListeners = normalizeAddresses(cfg.RPCListeners, activeNetParams.rpcPort) - // Only allow TLS to be disabled if the RPC is bound to localhost - // addresses. - if !cfg.DisableRPC && cfg.DisableTLS { - allowedTLSListeners := map[string]struct{}{ - "localhost": {}, - "127.0.0.1": {}, - "::1": {}, - } - for _, addr := range cfg.RPCListeners { - host, _, err := net.SplitHostPort(addr) - if err != nil { - str := "%s: RPC listen interface '%s' is " + - "invalid: %v" - err := fmt.Errorf(str, funcName, addr, err) - fmt.Fprintln(os.Stderr, err) - fmt.Fprintln(os.Stderr, usageMessage) - return nil, nil, err - } - if _, ok := allowedTLSListeners[host]; !ok { - str := "%s: the --notls option may not be used " + - "when binding RPC to non localhost " + - "addresses: %s" - err := fmt.Errorf(str, funcName, addr) - fmt.Fprintln(os.Stderr, err) - fmt.Fprintln(os.Stderr, usageMessage) - return nil, nil, err - } - } - } // Add default port to all added peer addresses if needed and remove // duplicate addresses. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..221bb672 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: "3" + +volumes: + lbcd: + +services: + lbcd: + image: jeffreypicard/lbcd:deployment + container_name: lbcd + environment: + - LISTEN_ADDR= # Set me + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - lbcd:/root/.lbcd + ports: + - "9245:9245" + - "9246:9246" diff --git a/run.sh b/run.sh new file mode 100755 index 00000000..5261eb08 --- /dev/null +++ b/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +lbcd --txindex --notls --rpcuser=lbry --rpcpass=lbry --rpclisten=$LISTEN_ADDR:9245