From 2e3e5e43cc65bf0abcec65ff6c61a2758ebda954 Mon Sep 17 00:00:00 2001 From: Lukas Pierchalla Date: Sun, 20 Sep 2026 11:13:23 +0200 Subject: [PATCH] update entrypoint.sh to create config.toml and adjust environment variables in scalable_sync.py --- compose.yaml | 1 + entrypoint.sh | 8 ++++++++ scalable_sync.py | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index 5e804fd..85be981 100644 --- a/compose.yaml +++ b/compose.yaml @@ -6,6 +6,7 @@ services: SCALABLE_CLI_VERSION: "1.0.0" PUID: ${PUID} PGID: ${PGID} + command: ["--daemon"] image: scalable-sync:latest hostname: scalable-sync container_name: scalable-sync diff --git a/entrypoint.sh b/entrypoint.sh index 18e28a9..8f4d555 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,6 +5,14 @@ set -e chown -R ${PUID:-1000}:${PGID:-1000} /app/data /tmp/sc-config 2>/dev/null || true chmod 700 /tmp/sc-config 2>/dev/null || true +# config.toml immer schreiben — verhindert DBus/Keyring-Fehler +mkdir -p "${SC_CONFIG_DIR:-/tmp/sc-config}" +cat > "${SC_CONFIG_DIR:-/tmp/sc-config}/config.toml" <<'EOF' +[auth] +session_backend = "file" +signing_key_backend = "file" +EOF + # Wenn der erste Parameter "python" ist oder das Skript selbst → Python starten if [ "$1" = "python" ] || [ "$1" = "/app/scalable_sync.py" ]; then shift diff --git a/scalable_sync.py b/scalable_sync.py index 9c50327..67cb0fd 100644 --- a/scalable_sync.py +++ b/scalable_sync.py @@ -59,7 +59,7 @@ log = logging.getLogger("scalable-sync") def sc(*args: str, timeout: int = 60) -> dict: cmd = ["sc"] + list(args) - env = {**os.environ, "HOME": "/home/sync", "SC_CONFIG_DIR": str(SC_CONFIG_DIR)} + env = {**os.environ, "HOME": "/home/appuser", "SC_CONFIG_DIR": str(SC_CONFIG_DIR)} result = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout, env=env) if result.returncode != 0: log.error("sc failed: %s", result.stderr)