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

Docker not runs if you don't specify the server directory #756

Open
DryByte opened this issue Feb 28, 2023 · 4 comments
Open

Docker not runs if you don't specify the server directory #756

DryByte opened this issue Feb 28, 2023 · 4 comments
Labels
bug This issue reports a bug in piqueserver code and/or docs triage The Priority of this Bug has not been decided yet.

Comments

@DryByte
Copy link
Contributor

DryByte commented Feb 28, 2023

Describe the bug
Looks like docker isnt able to run by default, it executes piqueserver -d /config, but the /config directory seems to be empty.

To Reproduce
Steps to reproduce the behavior:

  1. # docker build -t piqueserver .
  2. # docker run piqueserver

Expected behavior
It should run even without specifying the config dir.

Stack Trace or logs

Loading config from '/config/config.json'
Could not open Config file
[Errno 2] No such file or directory: '/config/config.json'

Server (please complete the following information):

  • Docker from latest commit

Additional context
It looks for the files on /config, but we never copy any file to that directory, so i suppose it should run piqueserver on piqueserver/config or do a COPY piqueserver/config /config. Im not too familiar with dockers, but it looks like a bug for me.

@DryByte DryByte added bug This issue reports a bug in piqueserver code and/or docs triage The Priority of this Bug has not been decided yet. labels Feb 28, 2023
@DryByte DryByte changed the title Docker not runs Docker not runs if you don't specify the server directory Feb 28, 2023
@NotAFile
Copy link
Member

The general way you're supposed to use this is to mount your config directory into the image using -v mydir:/config.

Copying the default config into the image would mean that it is impossible to change the config of the server, so that wouldn't be very good.

One way to handle this could be to make the entrypoint script run --copy-config if the config directory is empty. However this means that unless you set up a volume mount as above, all of your data will be lost after a restart.

So the current solution is just a compromise of the two. It should probably just be documented better.

@DryByte
Copy link
Contributor Author

DryByte commented Mar 1, 2023

Hmm, i guess so. I was thinking about trying to detect if user passes the volume parameter to docker, then can be sent a warning to the user warning him about that... But looks like its not possible.

Making an "auto setup/run" script its bad for it? So, people can just run the script and get it working quick.

@NotAFile
Copy link
Member

NotAFile commented Mar 1, 2023

I mean I am not opposed to adding an automatic copy-config to the entrypoint. I feel like that's the best option there.

@DryByte
Copy link
Contributor Author

DryByte commented Mar 1, 2023

Yes, but its not possible to send any warning to the user saying to use -v so he can change the server config and save the server state. But, i guess its the best option to add the copy config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports a bug in piqueserver code and/or docs triage The Priority of this Bug has not been decided yet.
Projects
None yet
Development

No branches or pull requests

2 participants