EnigmaticaModpacks / Enigmatica4

The official repository and issue-tracker for Enigmatica 4
https://www.curseforge.com/minecraft/modpacks/enigmatica4
19 stars 24 forks source link

Please split server install out of server-start.sh #383

Closed unexceptable closed 4 years ago

unexceptable commented 4 years ago

Modpack version 0.5.4

Issue I do a docker build of modpacks that I tend to run for myself and others, and I like to be able to download the server modpack, and then install it (and forge). See: https://gitlab.com/minecraft-docker/enigmatica4

The entrypoint for the container is then the server start script, but I don't like the forge install happening every time the container starts up, and would rather have that happen only when the container is build. The container when run should just start the server with little external downloading needed, and people can mount in world/config files as needed.

If you had a server-install.sh script, I could call that in my build, and the container on start up would just call server-start.sh. You can still have the logic in server-start.sh call the install script to ensure Forge and Minecraft is installed. Which in my case would work fine since the start script would see Forge was already there, and do nothing other than start the server.

FTB do something similar with their modpacks, and it makes the process a little nicer: https://gitlab.com/minecraft-docker/ftb-revelation/-/blob/latest/dockerfile#L11

NielsPilgaard commented 4 years ago

The server-start.sh doesn't download Forge or Minecraft if they're already installed, so I'm not sure what the issue is? Edit: Really cool that you're making Docker builds for modpacks!

unexceptable commented 4 years ago

The problem is that I don't see a way to run the server start script without also running the server, and if I did that in the build process just to have it install forge, I couldn't then halt it. I just want to run the install forge part so it gets built into the container image, and then when someone runs the container the server/forge code is already setup.

NielsPilgaard commented 4 years ago

Ah alright, that's definitely do-able :)

unexceptable commented 4 years ago

Awesome. Ty!

ghost commented 4 years ago

This issue was moved by NillerMedDild to NillerMedDild/enigmatica5#259.

NielsPilgaard commented 4 years ago

Do you want the server to be started once to generate the eula, in the install-server script?

NielsPilgaard commented 4 years ago

Would you mind checking if the file created in commit 98d940a ^ works as you would like? :)

unexceptable commented 4 years ago

@NillerMedDild Yep that looks good! Just haven't had a chance to test it yet, but definitely looks like it would solve my problem. :)

In my case, no need to deal with the eula, I just place a file for that, and for most that should be easy enough.