fix: chmod 777 log dir on compose generation so container decnet user can write logs

This commit is contained in:
2026-04-09 19:36:53 -04:00
parent 14f7a535db
commit 8d023147cc

View File

@@ -43,8 +43,11 @@ def generate_compose(config: DecnetConfig) -> dict:
log_container_path: str | None = None
if config.log_file:
log_host_dir, log_container_path = _resolve_log_file(config.log_file)
# Ensure the host log directory exists so Docker doesn't create it as root-owned
Path(log_host_dir).mkdir(parents=True, exist_ok=True)
# Ensure the host log directory exists and is writable by the container's
# non-root 'decnet' user (DEBT-019). mkdir respects umask, so chmod explicitly.
_log_dir = Path(log_host_dir)
_log_dir.mkdir(parents=True, exist_ok=True)
_log_dir.chmod(0o777)
for decky in config.deckies:
base_key = decky.name # e.g. "decky-01"