mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
Handle remote configs in entrypoint.sh
This commit is contained in:
parent
6d1130bae8
commit
e250fd9ae3
1 changed files with 7 additions and 2 deletions
|
|
@ -29,8 +29,13 @@ if [ ! -f "$FIRST_RUN_FILE" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fallback to sample config if a config does not exist
|
# Fallback to sample config if a config does not exist
|
||||||
if [ ! -f "$CONFIG_PATH" ]; then
|
if echo "$CONFIG_PATH" | grep -qE '^https?://'; then
|
||||||
echo -e "\e[33m[Warning] Config file at CONFIG_PATH not found. Falling back on sample config.\e[0m"
|
if ! curl --output /dev/null --silent --head --fail "$CONFIG_PATH"; then
|
||||||
|
echo -e "\e[33m[Warning] Remote config file at '$CONFIG_PATH' not found. Falling back on sample config.\e[0m"
|
||||||
|
CONFIG_PATH="./sample-config.json"
|
||||||
|
fi
|
||||||
|
elif [ ! -f "$CONFIG_PATH" ]; then
|
||||||
|
echo -e "\e[33m[Warning] Config file at '$CONFIG_PATH' not found. Falling back on sample config.\e[0m"
|
||||||
CONFIG_PATH="./sample-config.json"
|
CONFIG_PATH="./sample-config.json"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue