Fix docker graceful shutdown (#830)

* 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>
pull/835/head
Florent 3 months ago committed by GitHub
parent f45c53d7d4
commit 36ade2bfd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -142,4 +142,4 @@ ENV \
EXPOSE 8484
CMD ./sandbox/run.sh
CMD ["./sandbox/run.sh"]

@ -16,4 +16,4 @@ if [[ "$GRIST_SANDBOX_FLAVOR" = "gvisor" ]]; then
./sandbox/gvisor/update_engine_checkpoint.sh
fi
NODE_PATH=_build:_build/stubs:_build/ext node _build/stubs/app/server/server.js
exec env NODE_PATH=_build:_build/stubs:_build/ext node _build/stubs/app/server/server.js

Loading…
Cancel
Save