jammsen / docker-palworld-dedicated-server

Docker container to easily provision and manage Palworld Dedicated Server
https://hub.docker.com/r/jammsen/palworld-dedicated-server
MIT License
907 stars 157 forks source link

[BUG] Fails to detect existing configuration and overwrites it with default template #10

Closed redeven closed 7 months ago

redeven commented 7 months ago

Have you read the Important information text above

Current behavior

Despite having existing config files mounted, it fails to detect them and overwrites them with the template, every single time. This has started happening today (likely related to #5), after the docker image was updated.

Desired behavior

Existing mounted config files should be respected.

Links to screenshots

image

To Reproduce

  1. Launch the docker container to generate config files, then shut it down
  2. Change config files as needed
  3. Launch the docker container again
  4. Config is overwritten by template

Software setup

Hardware setup

Additional context

No response

jammsen commented 7 months ago

The standard config is copied every start on purpose, so you get the latest config and not a "not working server". The usual stuff can be setup in the Docker-Compose file. And yes #5 was the merge to help establish this setup.

Lakio21 commented 7 months ago

I have the same issue and even after updated my compose file, the configuration file has not been modified with the compose values. I overwrote my compose env variables with the one in the readme. This is quite annoying because it reset the server password the default one and so making players unable to join the server ...

pierre-nicoli commented 7 months ago

The latest version of the container allows for setting the SERVER_PASSWORD envvar, which should then be copied to the conf file :)

alekm commented 7 months ago

The latest version of the container allows for setting the SERVER_PASSWORD envvar, which should then be copied to the conf file :)

On systems like TrueNAS Scale, the environment variable can't be blank. So how can we make it a public server without a password?

alekm commented 7 months ago

The latest version of the container allows for setting the SERVER_PASSWORD envvar, which should then be copied to the conf file :)

On systems like TrueNAS Scale, the environment variable can't be blank. So how can we make it a public server without a password?

Disregard. Double quotes works.

jammsen commented 7 months ago

I have the same issue and even after updated my compose file, the configuration file has not been modified with the compose values. I overwrote my compose env variables with the one in the readme. This is quite annoying because it reset the server password the default one and so making players unable to join the server ...

Hey @Lakio21 This should defently be possible, update your docker-image please and maybe try a fresh docker-compose file from the template. I have testet this now surely 50+ times. If you have still problems let me know that we will get down to this.

jammsen commented 7 months ago

@redeven if have fixed a lot of bugs, this should be better now i hope, please review and let me know.

Please go ahead and test things. New Docker-Compose File is needed. You can find now examples in the README.md. The docker-compose.yml was removed because of dublicate code.

Lakio21 commented 7 months ago

@jammsen Sorry for the late reponse. It was a little urgent so I end up forking your repo and revert to the previous state to make the server quickly up and running. I will give it ago later when I have more free time.

jammsen commented 7 months ago

If this issue is solved, please give me feedback on the patch and please consider giving me a Star here and on Docker-Hub.

jammsen commented 7 months ago

Ping

gchai commented 7 months ago

What would be the best way to update the server options that are not covered by the env vars in the game? For example bEnableFriendlyFire or GuildPlayerMaximum? When I edit the values, they get overwritten on launch.

redeven commented 7 months ago

While setting it through the env var (which requires doing SERVER_PASSWORD="" with quotes as an empty var will fail and get overwritten) works, it "expands" for lack of a better word, during the replacement in the settings file. image As you can see, on every boot, it adds extra quotes. The game server still seems to parse it as empty which is fine but it's definitely not the intended value replacement.

jammsen commented 7 months ago

Please use SERVER_PASSWORD= @redeven

What would be the best way to update the server options that are not covered by the env vars in the game? For example bEnableFriendlyFire or GuildPlayerMaximum? When I edit the values, they get overwritten on launch.

@gchai If you need other variables you are free to open an issue and i will look into that OR you join the issue #29 which "maybe wants" to have a "dumb" or "manual" mode to not use ENVs but only the config-file itself to be manually edited. Not sure what the requestor really wanted. But a manual/dum mode would be possible, while the ENVs way is considered Best-Practice in all of Docker and K8s / Twelve-Factor-App

gchai commented 7 months ago

I can add all the variables in as a Env Var and make a PR!

gchai commented 7 months ago

40 submitted!

jammsen commented 7 months ago

Hey @gchai Thats some nice work, are you already on the readme for this too?

jammsen commented 7 months ago

This behavior should be solved with https://github.com/jammsen/docker-palworld-dedicated-server/commit/8546c890a518c99ab9be13b35a876c01ddaa7bde#diff-3b41cd2eeb76ac64c4b71b9cc6b253b358ab737f50d54e333b631ca27357e98e

Feel free to reopen the issue if the problem persists.

If you like this project, please consider giving this repo and the docker-hub-repo a Star.