Let the daemon receive docker stop's signal itself (closes #33)
check / check (push) Successful in 2m42s
check / check (push) Successful in 2m42s
entrypoint.sh now switches to the routewatch user (UID 1000) with setpriv instead of runuser. setpriv replaces itself with the daemon, so the daemon is the container's main process and receives docker stop's signal itself. runuser stayed in between, passed the signal on and killed the daemon 2 seconds later, so every stop ended with exit 143. The daemon now gets the whole wait the caller allows, up to its own 60-second limit, and a clean stop exits 0. Taking ownership of the state directory and the MALLOC_ARENA_MAX check still run as root first. Not fixed here: a stop while the feed is flowing can still panic (#34). Model: opus-5-5
This commit was merged in pull request #35.
This commit is contained in:
+2
-2
@@ -79,8 +79,8 @@ RUN chown -R routewatch:routewatch /app
|
||||
ENV XDG_DATA_HOME=/var/lib
|
||||
|
||||
# Cap the Go heap at 1.5 GiB so the runtime collects harder before the
|
||||
# container's memory limit is reached. runuser preserves this the way it does
|
||||
# XDG_DATA_HOME above.
|
||||
# container's memory limit is reached. setpriv in the entrypoint preserves this
|
||||
# the way it does XDG_DATA_HOME above.
|
||||
ENV GOMEMLIMIT=1536MiB
|
||||
|
||||
# Cap glibc's malloc arenas. The SQLite C library allocates and frees millions
|
||||
|
||||
Reference in New Issue
Block a user