In one CLI-command, spin up a Minecraft Server using premptible instances that terminates when not in use and spins up somewhat quickly.
In a bash terminal, run ./setup.sh to get started.
There are still some things hard coded that shouldn't be hard coded
This function checks if the server is up or not, and if it's up, reports how many players are currently connected.
This function calls get server status, and if the server is up, but contains 0 players, terminates the compute instance. This function is called every 20 minutes by a cloud scheduler
This function starts the compute instance and returns an HTML page that polls get server status and reports the status on the site
This is a premptibe compute instance with an SSD attached. The SSD has a daily backup schedule that keeps the last 3 days state so that if something goes wrong and you play frequently enough, you can restore the server