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

#197: Externalize config creation #208

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

#197: Externalize config creation #208

wants to merge 1 commit into from

Conversation

deveth0
Copy link

@deveth0 deveth0 commented Mar 11, 2019

Hi again,

i spend some time on the weekend to find a better way to centralize the generation of the config files.

Currently both scenario.sh and docker-entrypoint.sh do very similar stuff but the scenario.sh is outdated and misses some of the improvements done in docker-entrypoint.sh.
To prevent this situation, I'd suggest to externalize the creation of the config/saves/mods folders into a script and call this from the entrypoints. So any update only needs to be done once and not in every entrypoint.

The same is valid for the start of the server, which in both cases requires the same parameters (aside from start-server-*** which is different. Currently the scenario.sh does not fall back to the factorio user but still executes factorio as root. Therefor I'd also suggest to use a central script here which can be called and takes care of the execution.

Please have a look into the code and give feedback.

Note: I also added an optional /provisioning folder, where any configs, saves or mods can be places. Those will be loaded when the server starts. This allows us to bootstrap the server without the need of any restarts (which is very handy when running e.g. on AWS or GCP where you don't want to access the container).

@janhartigan
Copy link

I like the idea of externalizing the config. Cleans things up a bit.

Could you explain a bit further how provisioning differs from mounting a volume using -v /opt/factorio:/factorio. Might be worth describing why it's useful in more detail in the readme as well. Thanks!

@bplein
Copy link

bplein commented Jun 25, 2019

I worked on the original scenario code and I'm happy to have it replaced with an improved version. I'm not going to try and maintain it myself.

I use scenario2map (which runs and exits) and then relaunch my container with the same code I always use when restarting an existing server.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jul 5, 2019

Closes #223

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants