jammsen / docker-sons-of-the-forest-dedicated-server

Docker container to easily provision and manage Sons of the Forest Dedicated Server with Wine
https://hub.docker.com/r/jammsen/sons-of-the-forest-dedicated-server
134 stars 19 forks source link

Hardcoded USERDATA_PATH #10

Closed justmiles closed 12 months ago

justmiles commented 1 year ago

Hi team!

It looks like the -userdatapath argument is hardcoded to /sonsoftheforest/userdata. This makes it difficult for folks that want to pass the configuration files into the container, as that path is nested under the GAME_PATH.

Could we make USERDATA_PATH default to /sonsoftheforest/userdata but allow overrides from the environment?

jammsen commented 1 year ago

Hey @justmiles Im not really understanding what you mean and what the scenario is what you want to cover and what goals to reach?

Do you mean in https://github.com/jammsen/docker-sons-of-the-forest-dedicated-server/blob/master/usr/bin/servermanager.sh#L84 Change to the following code or what do you mean?

wine64 /sonsoftheforest/SonsOfTheForestDS.exe -userdatapath $USERDATA_PATH
justmiles commented 1 year ago

Hey, yes. That's to allow setting a custom path for anyone trying to separate the game data from configs. I'd like to manage the config separately from the /game. I'm passing it in like this.

-v $(pwd)/dedicatedserver.cfg:/userdata/dedicatedserver.cfg

I've got a fork with this enabled. I'll submit a PR for you to review.

jammsen commented 1 year ago

@justmiles did you look here? https://github.com/jammsen/docker-sons-of-the-forest-dedicated-server/pull/11

justmiles commented 1 year ago

Yes, I wrote it.

jammsen commented 1 year ago

I know, but i mean the 3 Pending Review Questions.

justmiles commented 1 year ago

Odd. Not sure what I'm missing but I don't see any review questions.

jammsen commented 1 year ago

Now?

justmiles commented 1 year ago

Ah, I see it now! Thanks - I'll respond to those comments.

jammsen commented 1 year ago

Building and testing now

jammsen commented 1 year ago

Hey @justmiles So aside from a windows-vs-unix encoding problem which can easily be solved by "dos2unix servermanager.sh" and missing chmod +x permissions which might be down to my setup, everything else is working just fine.

Im done pushing the image right now to Docker-Hub - Feel free to test it and give me a feedback if what you want to do works 😃

jammsen commented 1 year ago

@justmiles did you test it yet?

justmiles commented 1 year ago

Haven't been able to yet but it's on my radar.

jammsen commented 1 year ago

Take your time 😎 its weekend and time to fill up the batteries

justmiles commented 12 months ago

@jammsen this is working as expected! Thanks for helping out here!

jammsen commented 12 months ago

@justmiles No Sir! Thank you! 😄