Skip to content

fix(docker): restart container when backend exits - #107

Open
samtruman wants to merge 1 commit into
moderniselife:developfrom
samtruman:fix/upstream-docker-restart-lifecycle
Open

samtruman wants to merge 1 commit into
moderniselife:developfrom
samtruman:fix/upstream-docker-restart-lifecycle

Conversation

@samtruman

Copy link
Copy Markdown
Contributor

Problem

When the backend exits intentionally for a settings restart, the web process remains alive under the shell entrypoint.

Root cause

The entrypoint waited for both background children, so PID 1 stayed alive and Docker could not apply its restart policy.

Fix

Detect the first child exit, handle zombie state, terminate the surviving child, and let the container exit so Docker can restart it.

Tests

  • POSIX shell syntax check
  • Isolated Docker lifecycle/restart test validated on the candidate image
  • Existing suite: 258/258 pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant