update compose.yaml to adjust volume mappings; modify Dockerfile to install fewer packages and update entrypoint.sh for config directory handling
This commit is contained in:
+1
-4
@@ -35,9 +35,6 @@ SC_SETTLED_ONLY = os.getenv("SC_SETTLED_ONLY", "true").lower() == "true"
|
||||
SC_MAPPING_VERSION = int(os.getenv("SC_MAPPING_VERSION", "1"))
|
||||
ASSET_MAP = json.loads(os.getenv("ASSET_MAP", "{}"))
|
||||
|
||||
# SC_CONFIG_DIR wird vom Entrypoint gesetzt und als read-only Bind-Mount eingehängt
|
||||
SC_CONFIG_DIR = Path(os.getenv("SC_CONFIG_DIR", "/tmp/sc-config"))
|
||||
os.environ["SC_CONFIG_DIR"] = str(SC_CONFIG_DIR)
|
||||
|
||||
DATA_DIR = Path("/app/data")
|
||||
DATA_DIR.mkdir(exist_ok=True)
|
||||
@@ -58,7 +55,7 @@ log = logging.getLogger("scalable-sync")
|
||||
|
||||
def sc(*args: str, timeout: int = 60) -> dict:
|
||||
cmd = ["sc"] + list(args)
|
||||
env = {**os.environ, "HOME": "/home/appuser", "SC_CONFIG_DIR": str(SC_CONFIG_DIR)}
|
||||
env = {**os.environ, "HOME": "/home/appuser", "XDG_CONFIG_HOME": "/home/appuser/.config"}
|
||||
result = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout, env=env)
|
||||
if result.returncode != 0:
|
||||
log.error("sc failed: %s", result.stderr)
|
||||
|
||||
Reference in New Issue
Block a user