From f89e030c3fa412c238d544ab7e7838ae06713759 Mon Sep 17 00:00:00 2001 From: Stefan Benten Date: Sun, 20 Feb 2022 23:42:43 +0100 Subject: [PATCH] final touches Change-Id: I8fcc986f71f592507dc3f35ce4352647da46d461 --- Makefile | 2 +- cmd/multinode/Dockerfile | 6 ++---- cmd/multinode/entrypoint | 11 +++++++---- 3 files changed, 10 insertions(+), 9 deletions(-) mode change 100644 => 100755 cmd/multinode/entrypoint diff --git a/Makefile b/Makefile index 77c422985..979122aaa 100644 --- a/Makefile +++ b/Makefile @@ -202,7 +202,7 @@ images: multinode-image satellite-image storagenode-image versioncontrol-image # echo Built version: ${TAG} .PHONY: multinode-image -satellite-image: multinode_linux_arm multinode_linux_arm64 multinode_linux_amd64 ## Build multinode Docker image +multinode-image: multinode_linux_arm multinode_linux_arm64 multinode_linux_amd64 ## Build multinode Docker image ${DOCKER_BUILD} --pull=true -t storjlabs/multinode:${TAG}${CUSTOMTAG}-amd64 \ -f cmd/multinode/Dockerfile . ${DOCKER_BUILD} --pull=true -t storjlabs/multinode:${TAG}${CUSTOMTAG}-arm32v6 \ diff --git a/cmd/multinode/Dockerfile b/cmd/multinode/Dockerfile index 1ba9d1132..31294b46b 100644 --- a/cmd/multinode/Dockerfile +++ b/cmd/multinode/Dockerfile @@ -8,11 +8,9 @@ FROM ${DOCKER_ARCH:-amd64}/alpine ARG TAG ARG GOARCH ENV GOARCH ${GOARCH} - -ENV CONF_PATH=/root/.local/storj/multinode +EXPOSE 15002 WORKDIR /app -VOLUME /root/.local/storj/multinode COPY --from=ca-cert /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY release/${TAG}/multinode_linux_${GOARCH:-amd64} /app/multinode COPY cmd/multinode/entrypoint /entrypoint -ENTRYPOINT ["/entrypoint"] \ No newline at end of file +ENTRYPOINT ["/entrypoint"] diff --git a/cmd/multinode/entrypoint b/cmd/multinode/entrypoint old mode 100644 new mode 100755 index 1fcb472c2..8d1ea245f --- a/cmd/multinode/entrypoint +++ b/cmd/multinode/entrypoint @@ -1,9 +1,12 @@ #!/bin/sh set -euo pipefail -if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then - ./multinode setup +if [[ ! -f "/app/config/config.yaml" ]]; then + ./multinode setup --config-dir config --identity-dir identity fi -RUN_PARAMS="${RUN_PARAMS:-} --config ${CONF_PATH} --console.address=:15002" -exec ./multinode run $RUN_PARAMS "$@" \ No newline at end of file +RUN_PARAMS="${RUN_PARAMS:-} --config-dir config" +RUN_PARAMS="${RUN_PARAMS:-} --identity-dir identity" +RUN_PARAMS="${RUN_PARAMS:-} --console.address=:15002" + +exec ./multinode run $RUN_PARAMS "$@"