Skip to content
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

Maintenance: Drop zammad.ready file from docker entrypoint. #5087

Closed
wants to merge 2 commits into from

Conversation

mgruner
Copy link
Collaborator

@mgruner mgruner commented Mar 14, 2024

Zammad 6.3 will drop the var/ folder, so that no share is needed any more for it. That's a good chance to improve the container waiting in the docker compose context as well.

Rather than placing a file in the var share to signal readiness, we can simply call the rails stack and ask it to fail if migrations are pending. Other parts in the zammad-init container such as Translation.sync can happen later and are not a requirement for services to start. This will also reduce start time / upgrade downtime significantly.

zammad-helm will soon handle it in a similar way (see zammad/zammad-helm#243).

@mgruner mgruner requested a review from monotek March 14, 2024 10:48
Copy link
Member

@monotek monotek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initial idea behind this whole thing was to reduce logs with error messages during startup in docker-compose.

The helm chart should not use such file at all an do the right thing out of the box (restart the container if it can't reach one of it´s dependencies like postgres).

Maybe we can move to this pattern in docker-compose too?

@mgruner
Copy link
Collaborator Author

mgruner commented Mar 14, 2024

The initial idea behind this whole thing was to reduce logs with error messages during startup in docker-compose.

The PR provides such behaviours. The service containers will print a few lines like

waiting for init container to finish install or update...
waiting for init container to finish install or update...
waiting for init container to finish install or update...

Until everything is ready. And then they start up. No error messages! IMHO that is very user friendly behaviour, isn't it?

The helm chart should not use such file at all an do the right thing out of the box (restart the container if it can't reach one of it´s dependencies like postgres).

Maybe we can move to this pattern in docker-compose too?

It might be possible to control the restart policy of the containers somehow, but the current proposal is better IMHO: it uses less resources, and people are perhaps not used to restarting containers in such context than in k8s. It might also conflict with customizations that users made.

So I would suggest to stick with this proposal.

@zammad-sync zammad-sync force-pushed the develop-docker-drop-ready-file branch from c873b1f to 2f0822b Compare March 18, 2024 13:09
@mgruner
Copy link
Collaborator Author

mgruner commented Mar 18, 2024

c4d0f94

@mgruner mgruner closed this Mar 18, 2024
@mgruner mgruner deleted the develop-docker-drop-ready-file branch March 18, 2024 13:27
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.

None yet

2 participants