gristlabs_grist-core/sandbox/run.sh
Dmitry 6282558abd
Check gvisor on startup of run.sh, and clean up scripts related to gvisor flags (#760)
* Check gvisor on startup
* Clear up get_checkpoint_path.sh script, so it doesn't hurt to run it twice
2023-11-27 16:20:43 -05:00

20 lines
609 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [[ "$GRIST_SANDBOX_FLAVOR" = "gvisor" ]]; then
source ./sandbox/gvisor/get_checkpoint_path.sh
# Check GVISOR_FLAGS we ended up with. Don't ignore the output, it may be helpful in troubleshooting.
if runsc --network none $GVISOR_FLAGS "do" true; then
echo "gvisor check ok (flags: ${GVISOR_FLAGS})"
else
echo "gvisor check failed (flags: ${GVISOR_FLAGS}); consider different GVISOR_FLAGS or GRIST_SANDBOX_FLAVOR"
exit 1
fi
./sandbox/gvisor/update_engine_checkpoint.sh
fi
NODE_PATH=_build:_build/stubs:_build/ext node _build/stubs/app/server/server.js