pocket-id: πŸ› Bug Report: Use a process manager in the container to ensure apps restart if they crash

Reproduction steps

  1. Witness/cause a crash in one of the processes running in the container, either node, pocket-id-backend, or caddy
  2. The container is not restarted

Expected behavior

Either the entire container should crash, or the process should be restarted within the container

Actual Behavior

Process is not restarted, but the container is still up because the entrypoint is still up

Recommended fix: Use a process manager within the container, which ensures that:

  • Processes that crashes are restarted
  • At shutdown, all sub-processes are terminated correctly

PS: If looking for suggestions, I like supervisord.

Version and Environment

v0.39.0

Log Output

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

My 2 cents: taking a step back, why having a single container running three services instead of two/three containers? It’s common for services to provide a sample docker compose for easy self-hosting, e.g., https://github.com/plausible/community-edition/blob/v2.1.5/compose.yml.

Having granular containers lets you use docker as the supervisor without having to care about all of this.

Thanks @kmendell

@Pitasi It would be ideal if we would have an all-in-one image, separate images, support Kubernetes and Podman but this would require us to maintain all those installation methods even though we don’t use them. T

Because of that I would like to outsource those methods and then we just link to them in the docs.

We Answered why we have one container is this older issue: https://github.com/pocket-id/pocket-id/issues/148#issuecomment-2605789073. But to summarize: We want to have one image to simplify the steup process, as one of the core aspects of Pocket-ID is to be simple, and not as complex (setup and usage) as other OIDC providers.