update entrypoint.sh to create config.toml with proper ownership and fix script execution condition

This commit is contained in:
Lukas Pierchalla
2026-09-20 12:29:55 +02:00
parent dd431366c5
commit 45052b4b33
+3 -2
View File
@@ -3,18 +3,19 @@ set -e
chown -R ${PUID:-1000}:${PGID:-1000} /app/data 2>/dev/null || true
# sc liest config.toml aus $XDG_CONFIG_HOME/scalable-cli/ (Linux-Standard)
SC_CONF_DIR="${XDG_CONFIG_HOME:-/home/appuser/.config}/scalable-cli"
mkdir -p "${SC_CONF_DIR}"
chown -R ${PUID:-1000}:${PGID:-1000} "${SC_CONF_DIR}"
if [ ! -f "${SC_CONF_DIR}/config.toml" ]; then
cat > "${SC_CONF_DIR}/config.toml" <<'EOF'
[auth]
session_backend = "file"
signing_key_backend = "file"
EOF
chown ${PUID:-1000}:${PGID:-1000} "${SC_CONF_DIR}/config.toml"
fi
if [ "$1" = "python" ] || [ "$1" = "/app/scalable_sync.py" ]; then
if [ "$1" = "python" ] || [ "$1" = "/app/scalable_sync.py\" ]; then
shift
exec gosu appuser python /app/scalable_sync.py "$@"
fi