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.
This commit is contained in:
Alessandro 2026-06-19 11:57:09 +02:00
parent 78a50e1431
commit 684e0b414d
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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