docker-palworld-dedicated-server icon indicating copy to clipboard operation
docker-palworld-dedicated-server copied to clipboard

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

Open redeven opened this issue 1 year ago • 16 comments

Have you read the Important information text above

  • [X] Yes i did

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

  • OS: Ubuntu 22.04.3 LTS
  • Docker: Docker 24.0.5, Docker Compose 1.29.2

Hardware setup

  • CPU: Intel i7-10710U (6C/12T)
  • RAM: 32gb
  • Disk: 2 TB nvme

Additional context

No response

redeven avatar Jan 20 '24 23:01 redeven

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.

jammsen avatar Jan 21 '24 00:01 jammsen

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 ...

Lakio21 avatar Jan 21 '24 19:01 Lakio21

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

pierre-nicoli avatar Jan 21 '24 19:01 pierre-nicoli

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 avatar Jan 21 '24 21:01 alekm

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.

alekm avatar Jan 21 '24 21:01 alekm

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 avatar Jan 21 '24 22:01 jammsen

@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.

jammsen avatar Jan 22 '24 14:01 jammsen

@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.

Lakio21 avatar Jan 22 '24 17:01 Lakio21

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 avatar Jan 23 '24 00:01 jammsen

Ping

jammsen avatar Jan 23 '24 10:01 jammsen

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 avatar Jan 23 '24 12:01 gchai

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.

redeven avatar Jan 23 '24 13:01 redeven

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

jammsen avatar Jan 23 '24 16:01 jammsen

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

gchai avatar Jan 23 '24 18:01 gchai

#40 submitted!

gchai avatar Jan 23 '24 18:01 gchai

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

jammsen avatar Jan 23 '24 19:01 jammsen

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.

jammsen avatar Jan 25 '24 20:01 jammsen