Delete docker-entrypoint.sh
This commit is contained in:
parent
4c67abeda2
commit
91c6522e66
@ -1,30 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Defaults (can be overridden)
|
|
||||||
: "${SHAI_CONFIG:=/config/settings.conf}"
|
|
||||||
: "${SHAI_DATA:=/data/data.json}"
|
|
||||||
|
|
||||||
# Seed /config/settings.conf on first run if it doesn't exist
|
|
||||||
if [ ! -f "$SHAI_CONFIG" ]; then
|
|
||||||
mkdir -p "$(dirname "$SHAI_CONFIG")"
|
|
||||||
if [ -f /app/example/settings.conf ]; then
|
|
||||||
cp /app/example/settings.conf "$SHAI_CONFIG"
|
|
||||||
echo "Seeded default settings to $SHAI_CONFIG"
|
|
||||||
else
|
|
||||||
# Fall back: generate minimal config so the app can boot
|
|
||||||
cat > "$SHAI_CONFIG" <<EOF
|
|
||||||
[DEFAULT]
|
|
||||||
data_file = ${SHAI_DATA}
|
|
||||||
EOF
|
|
||||||
echo "Generated minimal $SHAI_CONFIG"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure data directory exists
|
|
||||||
mkdir -p "$(dirname "$SHAI_DATA")"
|
|
||||||
|
|
||||||
# Make path visible to the app (bot.py will still read the INI)
|
|
||||||
export SHAI_CONFIG SHAI_DATA
|
|
||||||
|
|
||||||
exec "$@"
|
|
Loading…
Reference in New Issue
Block a user