Open Player505 opened 6 months ago
Good idea. It's not going to be a trivial fit since properties files are "unstructured" compared to JSON, Yaml, and Toml; however the concept of the idea is great.
In the meantime, you can make use of variable substitution for managing container driven config file changes like that
https://docker-minecraft-server.readthedocs.io/en/latest/configuration/interpolating/
Thanks! Yeah I did some more reading of the docs and saw that I could use variable substitution but it was my understanding that I need to provide the config file to the container rather than patching one that it makes?
Yes, by default the variable substitution is performed on files copied over from /config
mount. You can have it process existing files with REPLACE_ENV_IN_PLACE
however, that'll be a one-time replacement since the variable will be gone after replacement.
Patching requires the file to be patched to be pre-existing, so it sounds like that wasn't going to solve your scenario as is.
I worked around patching the files by running the container twice. Once to generate the files and the second time to patch them.
I gave it some more thought and the packwiz capability might provide a better solution for my use case since packwiz can also deal with config files. My methodology is that I'd like to reduce the number of files required for reproducibility which is why I didn't want to mount a config folder.
My methodology is that I'd like to reduce the number of files required for reproducibility which is why I didn't want to mount a config folder.
💯
Enhancement Type
Improve an existing feature
Describe the enhancement
I noticed that when trying to set up a patch definition for simple voice chat to change the port it uses the
.properties
file type isn't recognizedThe file format of /data/config/voicechat/voicechat-server.properties could not be identified
It would be nice to get support for these files since a few mods use them