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 <>
Reviewed-on: vikunja/api#1200
Reviewed-by: konrad <>
Co-authored-by: TheEdgeOfRage <>
Co-committed-by: TheEdgeOfRage <>
Pavle Portic 8 months ago committed by konrad
parent c906fc2b07
commit b9793a267b

@ -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'