Add exec to run script to run app as PID 1 (#1200)
When running the docker container, the sh script will run as PID 1 and intercept any external signals (like docker stop) and won't pass it on to the app. Docker will wait for 10 seconds before proceeding to force kill the app, leading to both an unclean shutdown and an unnecessary wait of 10 seconds. The exec in the script replaces the shell process with the `su` process, which correctly passes on signals to the app process and triggers a regular shutdown when doing a docker stop. Co-authored-by: Pavle Portic <git@theedgeofrage.com> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/1200 Reviewed-by: konrad <k@knt.li> Co-authored-by: TheEdgeOfRage <git@theedgeofrage.com> Co-committed-by: TheEdgeOfRage <git@theedgeofrage.com>
This commit is contained in:
parent
c906fc2b07
commit
b9793a267b
1 changed files with 1 additions and 1 deletions
2
run.sh
2
run.sh
|
@ -4,4 +4,4 @@
|
|||
usermod --non-unique --uid ${PUID} vikunja
|
||||
groupmod --non-unique --gid ${PGID} vikunja
|
||||
|
||||
su vikunja -c '/app/vikunja/vikunja'
|
||||
exec su vikunja -c '/app/vikunja/vikunja'
|
Loading…
Reference in a new issue