storj/cmd/satellite/entrypoint
Clement Sam e486585853 Dockerfiles: switch base image from alpine to Debian
We've had a lot of issues with alpine and currently there's a broken
network issue on alpine for users running on RPI arm32 architechture
which requires a workaround before docker is able to sync time between
the host and the container: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0\#time64_requirements.

Since we're switching the base image of the storagenode to debian,
it's best to switch the base image of all our docker images to
debian as well for consistency; less drift across them and keeps
the push target consistent.

Change-Id: If3adf7a57dc59f19ef2221b892f340d919798fc5
2022-04-05 11:40:44 +00:00

37 lines
802 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
SETUP_PARAMS=""
if [ -n "${IDENTITY_ADDR:-}" ]; then
export STORJ_SERVER_ADDRESS="${IDENTITY_ADDR}"
fi
if [ ! -f "${CONF_PATH}/config.yaml" ]; then
./satellite setup $SETUP_PARAMS
fi
RUN_PARAMS="${RUN_PARAMS:-} --config-dir ${CONF_PATH}"
if [ "${SATELLITE_ADMIN:-}" = "true" ]; then
exec ./satellite run admin $RUN_PARAMS "$@"
fi
if [ "${SATELLITE_API:-}" = "true" ]; then
exec ./satellite run api $RUN_PARAMS "$@"
fi
if [ "${SATELLITE_GC:-}" = "true" ]; then
exec ./satellite run garbage-collection $RUN_PARAMS "$@"
fi
if [ "${SATELLITE_MIGRATE:-}" = "true" ]; then
exec ./satellite run migration $RUN_PARAMS "$@"
fi
if [ "${SATELLITE_REPAIR:-}" = "true" ]; then
exec ./satellite run repair $RUN_PARAMS "$@"
fi
exec ./satellite run $RUN_PARAMS "$@"