Support for alternative base folder for config files (settings.xml, banlist.xml, etc) #4228
Open
1 task done
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
Currently you can only change the following config file paths:
--config
parameter when starting the servermtaserver.conf
mtaserver.conf
Every other config and runtime generated files (e.g. settings.xml, banlist.xml, internal.db, registry.db, etc) are hardcoded to be in the
mods/deathmatch/
folder.The reason I'm writing this issue is because I'm working on a docker image for MTA:SA server, and I don't want to volume bind the whole
deathmatch
folder, only specific ones, like./config:server/mods/deathmatch/config
(for these exact files),./resources:server/mods/deathmatch/resources
, etc.Describe the solution you'd like
An option for base config folder path in
mtaserver.conf
, like:<config_base_folder></config_base_folder> <!-- Leave blank for default mods/deathmatch folder, change for an alternative path relative to mods/deathmatch -->
Maybe acl and idfile tags could use this folder as the parent root by default too.
Describe alternatives you've considered
A startup parameter for the server binary, the same way as the
--config
one. It could work the same way as themtaserver.conf
<config_base_folder>
solution../mta-server64 --config-folder config
(still relative to themods/deathmatch
folder, so this would meanmods/deathmatch/config/{settings.xml,internal.db,etc}
)Additional context
It's definitely not the most important thing in the world, but I believe it could be a great addition.
If the issue doesn't get enough positive feedback, sure, I could just bind the full
mods/deathmatch
folder as a volume, or do a bind for every single file, but then they couldn't easily be auto generated by the server, since docker would auto create them as completely empty files.If the issue does get enough positive feedback, then I'm willing to implement this as a PR, but I wouldn't want to make it without any discussion about it.
Security Policy
The text was updated successfully, but these errors were encountered: