Skip to content

Ignore pidfile when running in Docker#1212

Merged
CollinBeczak merged 1 commit intomainfrom
jlow/pidfile
Mar 18, 2026
Merged

Ignore pidfile when running in Docker#1212
CollinBeczak merged 1 commit intomainfrom
jlow/pidfile

Conversation

@jake-low
Copy link
Copy Markdown
Contributor

The application normally writes the process PID to /MapRouletteAPI/RUNNING_PID, and refuses to start when that file exists (to ensure only a single copy is running at a time).

However, this is annoying when running the backend in a container, where the orchestrator (Docker daemon, Kubernetes, etc) already ensures that only one instance is running per namespace. If the application crashes without cleaning up the RUNNING_PID file, then it will refuse to launch when the orchestrator restarts it. Depending on the deploy configuration, this may require a human to intervene by deleting the container before restarting the service.

To fix this, this PR makes the container image ignore the pidfile by default.

@sonarqubecloud
Copy link
Copy Markdown

@CollinBeczak CollinBeczak merged commit b7bfbb6 into main Mar 18, 2026
9 checks passed
@CollinBeczak CollinBeczak deleted the jlow/pidfile branch March 18, 2026 15:33
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.

2 participants