87ea2a4794
The current supervisord condifguration sets up the HTTP server to listen on a tcp socket which is private i.e. available only on localhost. This poses a regression where multiple containers cannot be run if the host network interface is used when docker container is run with `--network host` option. This change adds a new env variable `SUPERVISOR_SERVER`, with potential values `unix | private_port | public_port`, where `unix` is set as the default value. By default, the HTTP server is now set to listen on a UNIX domain socket. The file path is set to `/etc/supervisor/supervisor.sock` instead of the /tmp directory since some systems periodically delete older files in /tmp. If the socket file is deleted, supervisorctl will be unable to connect to supervisord. When SUPERVISOR_SERVER is set to `public_port` or `private_port`, the HTTP server is set to listen on a TCP socket. Resolves https://github.com/storj/storj/issues/4661 Change-Id: I224836dcae0293bcfe49874f2748be7723944687
27 lines
788 B
Docker
27 lines
788 B
Docker
ARG DOCKER_ARCH
|
|
ARG DOCKER_PLATFORM
|
|
|
|
FROM --platform=${DOCKER_PLATFORM:-linux/amd64} storjlabs/storagenode-base:70e276ecb-${DOCKER_ARCH:-amd64}
|
|
ARG TAG
|
|
ARG GOARCH
|
|
ARG VERSION_SERVER_URL
|
|
ARG SUPERVISOR_SERVER
|
|
ENV GOARCH ${GOARCH:-amd64}
|
|
ENV VERSION_SERVER_URL ${VERSION_SERVER_URL:-https://version.storj.io}
|
|
ENV SUPERVISOR_SERVER ${SUPERVISOR_SERVER:-unix}
|
|
EXPOSE 28967
|
|
EXPOSE 14002
|
|
# copy the files individually to avoid overriding the permissions on the folders
|
|
COPY cmd/storagenode/docker/entrypoint /entrypoint
|
|
COPY cmd/storagenode/docker/app/dashboard.sh /app/dashboard.sh
|
|
COPY cmd/storagenode/docker/bin/systemctl /bin/systemctl
|
|
WORKDIR /app
|
|
ENTRYPOINT ["/entrypoint"]
|
|
|
|
ENV ADDRESS="" \
|
|
EMAIL="" \
|
|
WALLET="" \
|
|
STORAGE="2.0TB" \
|
|
SETUP="false" \
|
|
AUTO_UPDATE="true"
|