Yep, I agree it would be good if some docs were added for this since other people have asked e.g
In theory you could deploy a public image using the fly CLI, like: fly deploy --remote-only -i example/image. But that would need adapting to add params.
Funny enough that Minecraft image was one I also played with locally and totally would have tried out on fly if there was an easy way to convert the run command
In many cases (like this one) you can craft or find a Dockerfile via docker inspect or docker history.
For the docker run command listed above, you’d just have to keep in mind that docker run -p 25655:25655 corresponds to internal_port:port in your fly.toml. Our tcp-echo and udp-echo example apps might come in handy here, too.
Yup, I had to scale it up to get the app to deploy successfully. I gave it dedicated-cpu-2x and --memory 4096. I can’t speak to its actual performance, since I don’t have a minecraft client myself, but it deployed surprisingly quickly when compared to a local build.
I don’t think I ended up deploying any http/tls handlers. Instead, my allowed_public_ports field an my services.ports section just had my app listening on 25565.
I only configured the health check for 25565 as a basic PoC since I’ve never actually played minecraft but I could see it on its public ip address!
I used a local Dockerfile to deploy pretty similar to what @cursecode shows above, the advantage with the Dockerfile being that you can configure the server easier than with command line args, also it seems to work pretty well with mods too.
fly.toml:
Some of the udp ports may not be needed but I’m not a minecraft or networking expert
Some mods may overwrite some of the settings so you may have to end up changing the server.properties file to have the values or set OVERRIDE_SERVER_PROPERTIES=true . But that seems to overwrite all values in the server.properties file rather than just the specified ones.