logging_bot / entrypoint.sh
AstraOS's picture
Update entrypoint.sh
57a39f3 verified
raw
history blame
451 Bytes
#!/usr/bin/env bash
set -e
# 1) Unpack byte-code into a writable tmpfs layer
mkdir -p /tmp/runner
tar -xzf /app/app.tgz -C /tmp/runner # -> /tmp/runner/app.pyc
# 2) Start the service from that copy
python /tmp/runner/app.pyc &
PID=$!
# 3) After a short grace period, delete both the unpacked .pyc and the tarball
sleep 2
rm -f /tmp/runner/app.pyc /app/app.tgz
echo "[entrypoint] byte-code deleted"
# 4) Re-attach to the service
wait "$PID"