Created
January 16, 2024 19:21
-
-
Save havarnov/ebfc4d5bd5c52eaa5a4beda0f78b4230 to your computer and use it in GitHub Desktop.
Minecraft Bedrock - fly.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
========= run.sh ========== | |
#!/bin/bash | |
socat UDP4-LISTEN:23191,fork,reuseaddr,bind=fly-global-services UDP4:127.0.0.1:19132 & | |
/opt/bedrock-entry.sh & | |
# Wait for any process to exit | |
wait -n | |
# Exit with status of process that exited first | |
exit $? | |
======= Dockerfile ======== | |
FROM itzg/minecraft-bedrock-server:latest | |
RUN apt update | |
RUN apt -y install socat | |
COPY ./run.sh ./run.sh | |
RUN chmod x ./run.sh | |
ENTRYPOINT ["./run.sh"] | |
========= fly.toml ======== | |
app = "<APPNAME>" | |
primary_region = "ams" | |
kill_signal = "SIGINT" | |
kill_timeout = "5s" | |
[env] | |
EULA = "TRUE" | |
GAMEMODE = "creative" | |
[[services]] | |
internal_port = 23191 | |
protocol = "udp" | |
[[services.ports]] | |
port = "23191" | |
[services.concurrency] | |
type = "connections" | |
hard_limit = 25 | |
soft_limit = 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment