Various Fixes#24
Conversation
|
I'm noticing that large curseforge packs suffer from rcon-cli not being able to connect to the rcon port. Several others have voiced this too itzg/docker-minecraft-server#518. Have no fear though! There's an alternative way to getting the number of players online. https://github.com/Dinnerbone/mcstatus # add a function to instance.py that gets the hostname of a docker (e.g. `minecraft`)
# pass that hostname to mcstatus in players.py instead of doing `rcon-cli list`
server = MinecraftServer.lookup(f"{game_host}:{game_port}")
status = server.status()
players = status.players.online
return players@Lemmons Any thoughts on this? Have you also experienced trouble with rcon-cli? |
| environment: | ||
| EULA: "TRUE" | ||
| MAX_RAM: "7G" | ||
| MAX_MEMORY: "7G" |
There was a problem hiding this comment.
MAX_MEMORY should probably be a user-defined variable since the size corresponds with instance type. It would also be nice to be able to add additional environment variables to this section. Terraform has some built in yaml functions that could take a dictionary variable in, merge it with another, and the pass the result through yaml:
locals {
environment_defaults = merge(
{
"EULA": "TRUE",
"MAX_MEMORY": var.max_memory,
"TYPE": var.modpack_type,
},
(var.modpack_type == "FTB" ? {"FTB_SERVER_MOD": var.modpack_version} : {"CF_SERVER_MOD": var.modpack_version}),
)
}
# later inside the template...
environment: ${yamlencode(merge(local.environment_defaults, var.environment_overrides))}Thoughts?
https://www.terraform.io/docs/configuration/functions/yamlencode.html
https://www.terraform.io/docs/configuration/functions/merge.html
There was a problem hiding this comment.
I am already merging environments in my setup, but I'll wait until this PR is done to include these changes in another. Trying to keep this one strictly on bug fixing for now.
|
More on that rcon issue, it seems that there are multiple server.properties files The one in /srv/minecraft-spot/data has all of the correct properties, but the one in the FeedTheBeast folder is missing anything provided by the environment section in docker-compose (thus rcon disabled by default). Hmmmm I'll need to investigate further, but I suspect that unpacking the modpack zip to |
|
Found the spot where itzg is hardcoding Seems there is no environment variable to override this, and it is incompatible with the hard-coded path of |
|
Thanks for the contribution and thought you put into this! I'm glad to know this project has been useful to somebody other than myself. I haven't had time to review the changes yet, as I'm actually in the middle of a move, but wanted to at least confirm I've seen this and let you know I'll try to get to it in the next week. |
|
I hacked a custom version of itzg's docker where the directory I'm open to contributing a lot more to this repo. If there's a roadmap that you have in mind or you want to just hear some of my ideas, I'd be happy to meet online at some point. Improvements to the web interface, backing up server log files, removing the previous.zip from S3 (since the bucket has versioned files), allow running in regions other than us-east-1... I don't struggle with coming up with ideas; I do have a hard time prioritizing them on a project that I have barely started using. |

First off, thanks for these terraform modules! Definitely a huge time saver for me! I wanted to contribute back some fixes that I found.