Skip to content

Commit 542c579

Browse files
authored
Add tini and process group reaping (#723)
1 parent 6503b26 commit 542c579

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ RUN groupadd -g "${PGID:-0}" -o valheim \
133133
libpulse-dev \
134134
libatomic1 \
135135
libc6 \
136+
tini \
136137
&& echo 'LANG="en_US.UTF-8"' > /etc/default/locale \
137138
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
138139
&& rm -f /bin/sh \

bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ main() {
1313
setup_supervisor_http_server
1414
setup_status_http_server
1515
pre_supervisor_hook
16-
exec /usr/local/bin/supervisord -c /usr/local/etc/supervisord.conf
16+
exec /usr/bin/tini -- /usr/local/bin/supervisord -c /usr/local/etc/supervisord.conf
1717
}
1818

1919

supervisord.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ stdout_logfile_maxbytes=1MB
3030
stderr_logfile_maxbytes=1MB
3131
autostart=true
3232
autorestart=true
33+
stopasgroup=true
34+
killasgroup=true
3335
priority=20
3436

3537
[program:valheim-bootstrap]
@@ -71,6 +73,8 @@ stdout_logfile_maxbytes=1MB
7173
stderr_logfile_maxbytes=1MB
7274
autostart=false
7375
autorestart=true
76+
stopasgroup=true
77+
killasgroup=true
7478
priority=50
7579

7680
[program:valheim-backup]
@@ -83,6 +87,8 @@ stdout_logfile_maxbytes=1MB
8387
stderr_logfile_maxbytes=1MB
8488
autostart=false
8589
autorestart=true
90+
stopasgroup=true
91+
killasgroup=true
8692
priority=50
8793

8894
[include]

0 commit comments

Comments
 (0)