zopanix / docker_factorio_server

Factorio Server in Docker
MIT License
31 stars 275 forks source link

Including server-settings.json #19

Closed hub23 closed 8 years ago

hub23 commented 8 years ago

I tried to set up a factorio 0.13.5 server using the options visibility, game_password and verify_user_identity. I ended up cloning this repo, adding the prepared server-settings.json and these messy lines:

Dockerfile: COPY ./server-settings.json /opt/server-settings.json

new_smart_launch.sh: factorio_command="$factorio_command --server-settings /opt/server-settings.json"

It would be great if these options are passable via docker run arguments.

hub23 commented 8 years ago

I just noticed, default verify_user_identity=true is not a problem anymore with tag 0.13.8. Would be nice anyhow to pass game_password, visibility, max_players, factorio.com login credentials needed for public visibility, etc.

hub23 commented 8 years ago

I added a pull request to include server-settings.json and add game_password over here: Added the ability to set a Server Password #20

baracoder commented 8 years ago

take a look at my fork https://github.com/baracoder/docker_factorio_server/blob/master/new_smart_launch.sh#L5 you can pass the settings as environment variables and generate the config on startup

RCM7 commented 8 years ago

I suggest using something like Dockerize for that purpose @baracoder

https://github.com/jwilder/dockerize

bkuhl commented 8 years ago

@RCM7 Thanks for sharing, that's pretty cool

hub23 commented 8 years ago

@RCM7 indeed this is really promising, especially waiting for dependencies is something I could have used a few times already. Since I am not fluent in shell code or coding at all, I try to keep the used components at a minimum to get a more clear picture of the logic behind.

Also, if --server-settings is passed multiple times, the server will fail to start.

/edit: I will rebuild from a new fork, do a clean commit of changes and test var input.

hub23 commented 8 years ago

New Pull Request: Added server-settings.json usage #21

baracoder commented 8 years ago

@RCM7 thank you for the suggestion but for this simple config a bit of shell (which is in the base image for free) is enough. ;)

zopanix commented 8 years ago

Hey everybody, I'm sorry to not being able to be very active but I'm currently moving and have to organize everything. I might have some time next week to take a look

hub23 commented 8 years ago

@zopanix there is no hurry. Thank you for maintaining this in the first place :v:

zopanix commented 8 years ago

@RCM7: Hey, dockerize looks great. It looks like it's very similar to consul-template bud env env var (or something else) instead of consul's KV to get the information. I'll look into this at noon, have to get some work done before. I'm also trying to make the image as lightweight as possible. I'll have to see if the weight of dockerize is worth the sacrifice ( it could be if some other templates would show up or if the "smart_launch becomes unreadable)

RCM7 commented 8 years ago

consul-template might be a bit overkill in this project I think 😄 Lemme get some time this week and I'll try to do a PR with some things implemented with dockerize. I'd also like to add the docker-compose I'm using personally if you'd like to have it.

zopanix commented 8 years ago

I don't have any experience with docker compose. I'd like this to stay relatively simple though and most importantly, I'd like it to stay easy to use bud go ahead :)

hub23 commented 8 years ago

Pull request is merged.