-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#55176] Cleanup Rails's tmp/pid/server.pid file for docker based development #15621
[#55176] Cleanup Rails's tmp/pid/server.pid file for docker based development #15621
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still have some questions open, but I appreciate the approach. removing the server.pid manually is a nuisance.
Really cool approach, learned about tmpfs for Docker compose. 👍 One question, why is this PR against the release branch? |
True, right now the target should be |
Because we run into that problem also when debugging or bug fixing on the release branch. So my intention is to get rid of the problem as soon as possible. And it only affects the developer setup. |
A question to the Mac users: Does tmpfs work for you? I just read here that this is only available for Linux hosts. |
Let me check |
This worked and after stopping with Ctrl+C, I did not have a PIDfile remain Also checked to run docker directly with
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
https://community.openproject.org/work_packages/55176
When developing with Rails it happens frequently that a PID file does not get cleaned up. Debugging why a local dev environment did not boot slows down development and increases developer frustration.
This PR aims to ensure that all former PID files are gone when calling
docker compose up -d backend
next time.Implementation details:
There are multiple approaches on how to make that happen.
docker/prod/web
file. That was inspired by an existing solution indocker/prod/entrypoint.sh
docker-compose.yml
file and also allows individual developers to easily override it at need.