From 684e0b414d3fbfeeb78bfcd2973eb61890acdb52 Mon Sep 17 00:00:00 2001 From: Alessandro <155005371+3clyp50@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:57:09 +0200 Subject: [PATCH] Ensure uploads directory exists on container startup Create /a0/usr/uploads during Docker runtime initialization before supervised services start so upload callers can rely on the directory immediately after boot. Document the startup directory contract in docker/run AGENTS instructions. --- docker/run/AGENTS.md | 1 + docker/run/fs/exe/initialize.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docker/run/AGENTS.md b/docker/run/AGENTS.md index f2bacfdf2..71b21a75c 100644 --- a/docker/run/AGENTS.md +++ b/docker/run/AGENTS.md @@ -20,6 +20,7 @@ - Preserve exposed ports for SSH, HTTP, and tunneled services unless docs and workflows are updated together. - Keep the two-runtime Python model aligned with the root contract. - Do not bake secrets, local `.env` values, or user data into the image. +- Runtime startup must ensure `/a0/usr/uploads` exists before supervised services start. ## Work Guidance diff --git a/docker/run/fs/exe/initialize.sh b/docker/run/fs/exe/initialize.sh index 8c329bb30..5335b8709 100644 --- a/docker/run/fs/exe/initialize.sh +++ b/docker/run/fs/exe/initialize.sh @@ -12,6 +12,9 @@ BRANCH="$1" # Copy all contents from persistent /per to root directory (/) without overwriting cp -r --no-preserve=ownership,mode /per/* / +# Ensure upload storage exists before API and connector callers can reference it. +mkdir -p /a0/usr/uploads + # allow execution of /root/.bashrc and /root/.profile chmod 444 /root/.bashrc chmod 444 /root/.profile