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

[enchancement] would be great if patches were applied after a full launch #2522

Open
ultard opened this issue Dec 2, 2023 · 3 comments
Open

Comments

@ultard
Copy link

ultard commented Dec 2, 2023

It would be great if patches were applied after a full launch, so you could change for example paper-global.yml to link server with proxy.

@itzg itzg transferred this issue from itzg/mc-image-helper Dec 2, 2023
@ultard
Copy link
Author

ultard commented Dec 2, 2023

Either I don't understand how to apply these patches, need more examples of how to do it correctly.

@itzg
Copy link
Owner

itzg commented Dec 2, 2023

This is a reasonable request however it is actually quite difficult to implement. The image startup script exec's off to mc-server-runner which runs the server java process and intercepts exit signals. It's that java server process, such as Paper, that initially creates the stock config files.

So, it would mostly involve an enhancement to mc-server-runner to add health check logic, check when the java server process is fully up and running, stop the server/container, and allow the container startup script to re-run with the patch invocation. And it needs to only do that the first time.

@itzg itzg changed the title [enchancement] patches [enchancement] would be great if patches were applied after a full launch Dec 2, 2023
@itzg
Copy link
Owner

itzg commented Dec 2, 2023

BTW, if you haven't seen it already, here is the docs section with an example

https://docker-minecraft-server.readthedocs.io/en/latest/configuration/interpolating/#patching-existing-files

One solution, to avoid the chicken-and-egg problem, is to make use of the /config mount point by placing the initial file there, let the container startup copy it over, patch it, and proceed on with the first startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants