07acf0e574
Previously, we ran setup if no config file was found in the expected dir. However, there may be situations where a previously set up node's files may be unreachable. In this case, we would prefer to exit with an error rather than assume this node needs to be initialized. The solution here is to add a new env variable to call the setup command. If SETUP == true, the node will setup, but not run. If SETUP != true, the node will run and not setup. If a previously set up node runs with SETUP, it will return an error. If a node runs without an initial SETUP, it will return an error. Change-Id: Id2c796ec3d43f2add5e5f34fb777a563eae59f2f
20 lines
485 B
Docker
20 lines
485 B
Docker
ARG DOCKER_ARCH
|
|
FROM ${DOCKER_ARCH:-amd64}/alpine
|
|
ARG TAG
|
|
ARG GOARCH
|
|
ENV GOARCH ${GOARCH}
|
|
EXPOSE 28967
|
|
WORKDIR /app
|
|
COPY resources/certs.pem /etc/ssl/certs/ca-certificates.crt
|
|
COPY release/${TAG}/storagenode_linux_${GOARCH:-amd64} /app/storagenode
|
|
COPY cmd/storagenode/entrypoint /entrypoint
|
|
COPY cmd/storagenode/dashboard.sh /app/dashboard.sh
|
|
ENTRYPOINT ["/entrypoint"]
|
|
|
|
# Remove after the alpha
|
|
ENV ADDRESS="" \
|
|
EMAIL="" \
|
|
WALLET="" \
|
|
STORAGE="2.0TB" \
|
|
SETUP="false"
|