#197: Externalize config creation#208
Open
deveth0 wants to merge 1 commit intofactoriotools:masterfrom
deveth0:feature/externalizeInit
Open
#197: Externalize config creation#208deveth0 wants to merge 1 commit intofactoriotools:masterfrom deveth0:feature/externalizeInit
deveth0 wants to merge 1 commit intofactoriotools:masterfrom
deveth0:feature/externalizeInit
Conversation
|
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 |
|
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. |
Member
|
Closes #223 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.shanddocker-entrypoint.shdo very similar stuff but thescenario.shis outdated and misses some of the improvements done indocker-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 thescenario.shdoes 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).