Hard work doesn’t always equal high value
It took me some years until I realized this 80/20 rule, where we should focus on what brings 80% ...
3 min read
brew install flyctl
# 1. Create the folder mkdir ~/minecraft && cd ~/minecraft # 2. Create the files touch Dockerfile fly.toml
FROM itzg/minecraft-server RUN apt-get install -y vim # plugins COPY ./plugins/PasswordProtect.jar /plugins/PasswordProtect.jar COPY ./plugins/PasswordProtect/config.yml /plugins/PasswordProtect/config.yml COPY ./init-scripts/update-config.sh /docker-entrypoint-init.d/update-config.sh RUN chmod +x /docker-entrypoint-init.d/update-config.sh
app = "my-awesome-minecraft-server" # Below, São Paulo, Brazil is selected; change to a region near you # Check https://fly.io/docs/reference/regions/ primary_region = "gru" kill_signal = "SIGTERM" kill_timeout = 120 [build] dockerfile = "Dockerfile" [deploy] wait_timeout = "5m" [env] TYPE = "PAPER" SERVER_NAME = "This is your server name" VERSION = "1.20.6" # Set to TRUE to allow only valid Mojang accounts ONLINE_MODE = "FALSE" EULA = "TRUE" DIFFICULTY = "normal" ENABLE_WHITELIST = "FALSE" ENABLE_AUTOSTOP = "TRUE" AUTOSTOP_TIMEOUT_EST = 120 AUTOSTOP_TIMEOUT_INIT = 120 MEMORY = "3G" AUTOSTOP_PKILL_USE_SUDO = "TRUE" # Message displayed when connecting to the server MOTD = "Hello Minecraft!" [mounts] source = "minecraft_data" destination = "/data" [[vm]] memory = '4096mb' cpu_kind = 'shared' cpus = 4 [[services]] internal_port = 25565 protocol = "tcp" min_machines_running = 0 max_machines_running = 1 # Minecraft handles autostop, so Fly doesn’t stop the machine auto_stop_machines = false auto_start_machines = true [[services.ports]] port = "25666" [[services.tcp_checks]] grace_period = "10s" interval = "5s" timeout = "3s"
fly deploy
# List your machines, replacing <app-name> with, e.g., "my-awesome-minecraft-server" fly machines list -a <app-name> # Attach the IP, replacing <machine-id> and <app-name> with values from the list fly machine egress-ip allocate <machine-id> -a <app-name> -y
It took me some years until I realized this 80/20 rule, where we should focus on what brings 80% ...
Gotta be honest, I just made this post to test R2 file storage, previously I was using Tigris. [M...
[2k words] On my language learning journey, I listed some goals regarding my Japanese learning. H...
Talk is cheap, show me the code