f9b2af934b
Fix the setup command of the entrypoint script used by the gateway docker container. Issue: https://github.com/storj/storj/issues/3748#issuecomment-574257152 Change-Id: I94c4d7aa148761645dd065f86b7d8e2d72bb727c
19 lines
406 B
Bash
Executable File
19 lines
406 B
Bash
Executable File
#!/bin/sh
|
|
set -euo pipefail
|
|
|
|
if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then
|
|
./gateway setup --config-dir "${CONF_PATH}"
|
|
fi
|
|
|
|
RUN_PARAMS="${RUN_PARAMS:-} --config-dir ${CONF_PATH}"
|
|
|
|
if [[ -n "${API_KEY:-}" ]]; then
|
|
RUN_PARAMS="${RUN_PARAMS} --api-key ${API_KEY}"
|
|
fi
|
|
|
|
if [ -n "${SATELLITE_ADDR:-}" ]; then
|
|
RUN_PARAMS="${RUN_PARAMS} --satellite-addr $SATELLITE_ADDR"
|
|
fi
|
|
|
|
exec ./gateway run $RUN_PARAMS "$@"
|