Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
redeven opened this issue Jan 20, 2024 · 17 comments
Closed
1 task done
Assignees
Labels
not-a-bug This does not look like a bug possible-config-error Unconfirmed configuration error possible-provision-error Unconfirmed provision error

Comments

@redeven
Copy link

redeven commented Jan 20, 2024

Have you read the Important information text above

  • 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

@jammsen
Copy link
Owner

jammsen commented Jan 21, 2024

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 jammsen self-assigned this Jan 21, 2024
@Lakio21
Copy link

Lakio21 commented Jan 21, 2024

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
Copy link

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

@alekm
Copy link

alekm commented Jan 21, 2024

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
Copy link

alekm commented Jan 21, 2024

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
Copy link
Owner

jammsen commented Jan 21, 2024

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 jammsen added not-a-bug This does not look like a bug possible-config-error Unconfirmed configuration error possible-provision-error Unconfirmed provision error labels Jan 21, 2024
jammsen added a commit that referenced this issue Jan 22, 2024
…ample from the community to run easy RCON commands, #14 Added mechanic to handle signals better, #10 Added compability
@jammsen
Copy link
Owner

jammsen commented Jan 22, 2024

@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
Copy link

Lakio21 commented Jan 22, 2024

@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
Copy link
Owner

jammsen commented Jan 23, 2024

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
Copy link
Owner

jammsen commented Jan 23, 2024

Ping

@gchai
Copy link
Contributor

gchai commented Jan 23, 2024

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
Copy link
Author

redeven commented Jan 23, 2024

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
Copy link
Owner

jammsen commented Jan 23, 2024

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
Copy link
Contributor

gchai commented Jan 23, 2024

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

@gchai
Copy link
Contributor

gchai commented Jan 23, 2024

#40 submitted!

@jammsen
Copy link
Owner

jammsen commented Jan 23, 2024

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

@jammsen
Copy link
Owner

jammsen commented Jan 25, 2024

This behavior should be solved with 8546c89#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-a-bug This does not look like a bug possible-config-error Unconfirmed configuration error possible-provision-error Unconfirmed provision error
Projects
None yet
Development

No branches or pull requests

6 participants