mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
36ade2bfd0
* run.sh: Replace pid with nodejs's one using exec This notably ensures that "docker stop" sends a TERM signal to the node process which can handle it gracefully and avoid document corruption. * Use exec form for CMD in Dockerfile --------- Co-authored-by: Florent FAYOLLE <florent.fayolle@beta.gouv.fr>
20 lines
618 B
Bash
Executable File
20 lines
618 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
|
|
|
|
exec env NODE_PATH=_build:_build/stubs:_build/ext node _build/stubs/app/server/server.js
|