image service

This commit is contained in:
2026-08-08 04:04:39 +00:00
parent 5b3a22d9da
commit b61efccd01
7 changed files with 114 additions and 2 deletions
+16
View File
@@ -10,6 +10,22 @@ if [ ! -f "$env_file" ]; then
exit 66
fi
for key in IMAGE_UPLOAD_CORE2026_SECRET_FILE IMAGE_SYNC_CORE2026_SECRET_FILE; do
value=$(sed -n "s/^${key}=//p" "$env_file" | tail -n 1)
if [ -z "$value" ]; then
echo "$key must name a readable, non-empty secret file." >&2
exit 66
fi
case "$value" in
/*) secret_path=$value ;;
*) secret_path=$stack_dir/$value ;;
esac
if [ ! -r "$secret_path" ] || [ ! -s "$secret_path" ]; then
echo "$key must name a readable, non-empty secret file." >&2
exit 66
fi
done
docker run --rm --network=none --memory=128m --memory-swap=128m --cpus=1 --pids-limit=64 --env-file "$env_file" \
-v "$stack_dir/runtime/validate-env.mjs:/opt/sammo/validate-env.mjs:ro" \
node:24.18.0-bookworm-slim node /opt/sammo/validate-env.mjs