logging_bot / entrypoint.sh
AstraOS's picture
Update entrypoint.sh
c7894f7 verified
raw
history blame
408 Bytes
#!/usr/bin/env bash
set -e
RDIR=/tmp/runner # always writable
mkdir -p "$RDIR"
# 1) copy tarball to writable layer
cp /app/app.tgz "$RDIR/"
# 2) unpack and run
tar -xzf "$RDIR/app.tgz" -C "$RDIR" # β†’ app.pyc
python "$RDIR/app.pyc" &
PID=$!
# 3) scrub the writable copy
sleep 2
rm -f "$RDIR/app.pyc" "$RDIR/app.tgz"
echo "[entrypoint] runtime copy removed from /tmp"
wait "$PID"