Logo
Explore Help
Register Sign In
andersmmg/api
1
0
Fork 0
You've already forked api
forked from vikunja/vikunja
Code Issues Pull Requests Packages Projects Releases Wiki Activity
api/run.sh

7 lines
186 B
Bash
Raw Normal View History

Add ability to run the docker container with configurable user and group ids
2020-05-22 21:18:11 +02:00
#!/bin/sh
# Set the uid and gid of the vikunja run user
usermod --non-unique --uid ${PUID} vikunja
groupmod --non-unique --gid ${PGID} vikunja
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>
2022-07-12 14:02:31 +00:00
exec su vikunja -c '/app/vikunja/vikunja'
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.7 Page: 8932ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API