Docker container start / stop support
Pheggas opened this issue · 2 comments
Is there an existing feature request for this?
- I have searched the existing issues before opening this feature request.
Describe the feature you would like to see.
Hello. I'd like to start / see the dockerized version of Minecraft server but I miss the documentation for this approach.
So i think it doesn't support docker yet and here I am asking to add the feature.
Describe the solution you'd like.
I'm using portainer to manage my servers and specially for this dockerized Minecraft server I'm using Portainer stack (which is basically Docker Compose). I'd like Minecraft server hibernation to monitor and check if the stack / container is running or not.
Additional context to this request.
No response
The following setup will allow msh to start and stop the docker container:
- make a msh directory and cd into it
- download msh here
- make a file
server.config
mirroringdocker ms server.config
- set msh-config.json as following:
{
"Server": {
"Folder": ".",
"FileName": "",
"Version": "1.18.2",
"Protocol": 758
},
"Commands": {
"StartServer": "docker run -i -p 25565:25565 -e EULA=TRUE itzg/minecraft-server",
"StartServerParam": "",
"StopServer": "stop",
"StopServerAllowKill": 10
},
"Msh": {
"Debug": 3,
"ID": "",
"MshPort": 25555,
"MshPortQuery": 25555,
"TimeBeforeStoppingEmptyServer": 30,
"SuspendAllow": false,
"SuspendRefresh": -1,
"InfoHibernation": " §fserver status:\n §b§lHIBERNATING",
"InfoStarting": " §fserver status:\n §6§lWARMING UP",
"NotifyUpdate": true,
"NotifyMessage": true,
"Whitelist": [],
"WhitelistImport": false,
"ShowResourceUsage": false,
"ShowInternetUsage": false
}
}
- start msh
- clients will be able to connect to the port specified in msh starting logs
this config will start and stop docker container running mincraft server only when players are on the server.
this setup works for me, depending on your config you might have to fiddle with the ports