From 089d5dc8519c5ea71732faab78ecf3cf5438c3fc Mon Sep 17 00:00:00 2001 From: DerGrumpf Date: Thu, 28 Nov 2024 01:21:44 +0100 Subject: [PATCH] Added Development Strategie --- development/.gitignore | 1 + development/README.md | 39 ++++++ development/dev-proxy/dev-server.png | Bin 0 -> 4017 bytes development/dev-proxy/proxy-compose.yml | 16 +++ development/dev-proxy/velocity.toml | 159 ++++++++++++++++++++++++ development/fallback-compose.yml | 54 ++++++++ development/main-compose.yml | 54 ++++++++ main/.gitignore | 3 + main/compose.yml | 2 +- main/mods.txt | 2 +- 10 files changed, 328 insertions(+), 2 deletions(-) create mode 100644 development/.gitignore create mode 100644 development/README.md create mode 100644 development/dev-proxy/dev-server.png create mode 100644 development/dev-proxy/proxy-compose.yml create mode 100644 development/dev-proxy/velocity.toml create mode 100644 development/fallback-compose.yml create mode 100644 development/main-compose.yml diff --git a/development/.gitignore b/development/.gitignore new file mode 100644 index 0000000..21983e8 --- /dev/null +++ b/development/.gitignore @@ -0,0 +1 @@ +./dev-proxy/proxy-data diff --git a/development/README.md b/development/README.md new file mode 100644 index 0000000..65cd7d1 --- /dev/null +++ b/development/README.md @@ -0,0 +1,39 @@ +# Development Build + +> [!NOTE] +> This setup is only for testing purposes. +> It is unsafe to use as a production build. + +## Prerequisits + +1. Check if `docker` & `docker compose` are installed correctly +2. Open 3 Terminal Windows (Or 2 depends on) +3. Change the ip in `velocity.toml` (Line 75 & 76) to your local ip (This gets reworked in the Future) + +## To Do +- [ ] Build system for the whole dev stack +- [ ] Networking between Containers + +## Handling the stack + +1. Start Dev Proxy + +```bash +docker compose -f dev-proxy/proxy-compose.yml up +``` + +2. Start Dev Fallback + +```bash +docker compose -f fallback-compose.yml up +``` + +3. Start Dev Main + +```bash +docker compose -f main-compose.yml up +``` + +4. Start Minecraft with Version 1.21.1 (Fabric highly preferred) +5. Add Server -> Server Address -> `localhost` +6. Connect diff --git a/development/dev-proxy/dev-server.png b/development/dev-proxy/dev-server.png new file mode 100644 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cKioJNOz>{SK z9vm(3_V z(4(Gf_rO@}MuO~3^nFs|>Ey3POFVhF)Qv+%HxNDq z!{|z*CCBJWt)n^?eyJPRN?mCvbt7G9S^C9MH@dRYQrqZCXQ>)#h*zv5RYoQD4g Xd5zS`OFg{d00000NkvXXu0mjfqbt`f literal 0 HcmV?d00001 diff --git a/development/dev-proxy/proxy-compose.yml b/development/dev-proxy/proxy-compose.yml new file mode 100644 index 0000000..e1d9b28 --- /dev/null +++ b/development/dev-proxy/proxy-compose.yml @@ -0,0 +1,16 @@ +services: + proxy: + container_name: dev_proxy + image: itzg/mc-proxy + environment: + TYPE: VELOCITY + DEBUG: true + VELOCITY_VERSION: latest + VELOCITY_BUILD_ID: 450 + volumes: + - ./dev-server.png:/server/server-icon.png + - ./velocity.toml:/config/velocity.toml + - ../../proxy/velocity/forwarding.secret:/config/forwarding.secret:ro + - ./proxy-data:/server + ports: + - 25565:25565 diff --git a/development/dev-proxy/velocity.toml b/development/dev-proxy/velocity.toml new file mode 100644 index 0000000..04cfc8f --- /dev/null +++ b/development/dev-proxy/velocity.toml @@ -0,0 +1,159 @@ +# Config version. Do not change this +config-version = "2.7" + +# What port should the proxy be bound to? By default, we'll bind to all addresses on port 25565. +bind = "0.0.0.0:25565" + +# What should be the MOTD? This gets displayed when the player adds your server to +# their server list. Only MiniMessage format is accepted. +motd = "Garde StudiosDEVELOPMENT BUILD" + +# What should we display for the maximum number of players? (Velocity does not support a cap +# on the number of players online.) +show-max-players = 5 + +# Should we authenticate players with Mojang? By default, this is on. +online-mode = true + +# Should the proxy enforce the new public key security standard? By default, this is on. +force-key-authentication = true + +# If client's ISP/AS sent from this proxy is different from the one from Mojang's +# authentication server, the player is kicked. This disallows some VPN and proxy +# connections but is a weak form of protection. +prevent-client-proxy-connections = false + +# Should we forward IP addresses and other data to backend servers? +# Available options: +# - "none": No forwarding will be done. All players will appear to be connecting +# from the proxy and will have offline-mode UUIDs. +# - "legacy": Forward player IPs and UUIDs in a BungeeCord-compatible format. Use this +# if you run servers using Minecraft 1.12 or lower. +# - "bungeeguard": Forward player IPs and UUIDs in a format supported by the BungeeGuard +# plugin. Use this if you run servers using Minecraft 1.12 or lower, and are +# unable to implement network level firewalling (on a shared host). +# - "modern": Forward player IPs and UUIDs as part of the login process using +# Velocity's native forwarding. Only applicable for Minecraft 1.13 or higher. +player-info-forwarding-mode = "modern" + +# If you are using modern or BungeeGuard IP forwarding, configure a file that contains a unique secret here. +# The file is expected to be UTF-8 encoded and not empty. +forwarding-secret-file = "forwarding.secret" + +# Announce whether or not your server supports Forge. If you run a modded server, we +# suggest turning this on. +# +# If your network runs one modpack consistently, consider using ping-passthrough = "mods" +# instead for a nicer display in the server list. +announce-forge = false + +# If enabled (default is false) and the proxy is in online mode, Velocity will kick +# any existing player who is online if a duplicate connection attempt is made. +kick-existing-players = false + +# Should Velocity pass server list ping requests to a backend server? +# Available options: +# - "disabled": No pass-through will be done. The velocity.toml and server-icon.png +# will determine the initial server list ping response. +# - "mods": Passes only the mod list from your backend server into the response. +# The first server in your try list (or forced host) with a mod list will be +# used. If no backend servers can be contacted, Velocity won't display any +# mod information. +# - "description": Uses the description and mod list from the backend server. The first +# server in the try (or forced host) list that responds is used for the +# description and mod list. +# - "all": Uses the backend server's response as the proxy response. The Velocity +# configuration is used if no servers could be contacted. +ping-passthrough = "DISABLED" + +# If not enabled (default is true) player IP addresses will be replaced by in logs +enable-player-address-logging = true + +[servers] +# Configure your servers here. Each key represents the server's name, and the value +# represents the IP address of the server to connect to. +main = "192.168.2.40:30000" +fallback = "192.168.2.40:30001" + + +# In what order we should try servers when a player logs in or is kicked from a server. +try = [ + "main", + "fallback" +] + +[forced-hosts] +# Configure your forced hosts here. +"cloud.cyperpunk.de" = [ + "main" +] + +"garde-studios.de" = [ + "fallback" +] + + +[advanced] +# How large a Minecraft packet has to be before we compress it. Setting this to zero will +# compress all packets, and setting it to -1 will disable compression entirely. +compression-threshold = 256 + +# How much compression should be done (from 0-9). The default is -1, which uses the +# default level of 6. +compression-level = -1 + +# How fast (in milliseconds) are clients allowed to connect after the last connection? By +# default, this is three seconds. Disable this by setting this to 0. +login-ratelimit = 3000 + +# Specify a custom timeout for connection timeouts here. The default is five seconds. +connection-timeout = 5000 + +# Specify a read timeout for connections here. The default is 30 seconds. +read-timeout = 30000 + +# Enables compatibility with HAProxy's PROXY protocol. If you don't know what this is for, then +# don't enable it. +haproxy-protocol = false + +# Enables TCP fast open support on the proxy. Requires the proxy to run on Linux. +tcp-fast-open = false + +# Enables BungeeCord plugin messaging channel support on Velocity. +bungee-plugin-message-channel = true + +# Shows ping requests to the proxy from clients. +show-ping-requests = false + +# By default, Velocity will attempt to gracefully handle situations where the user unexpectedly +# loses connection to the server without an explicit disconnect message by attempting to fall the +# user back, except in the case of read timeouts. BungeeCord will disconnect the user instead. You +# can disable this setting to use the BungeeCord behavior. +failover-on-unexpected-server-disconnect = true + +# Declares the proxy commands to 1.13+ clients. +announce-proxy-commands = true + +# Enables the logging of commands +log-command-executions = true + +# Enables logging of player connections when connecting to the proxy, switching servers +# and disconnecting from the proxy. +log-player-connections = true + +# Allows players transferred from other hosts via the +# Transfer packet (Minecraft 1.20.5) to be received. +accepts-transfers = false + +[query] +# Whether to enable responding to GameSpy 4 query responses or not. +enabled = true + +# If query is enabled, on what port should the query protocol listen on? +port = 25565 + +# This is the map name that is reported to the query services. +map = "Mappie" + +# Whether plugins should be shown in query response by default or not +show-plugins = false diff --git a/development/fallback-compose.yml b/development/fallback-compose.yml new file mode 100644 index 0000000..23d31a3 --- /dev/null +++ b/development/fallback-compose.yml @@ -0,0 +1,54 @@ +services: + fallback: + image: itzg/minecraft-server + container_name: dev_fallback + restart: always + environment: + # What Server + EULA: "true" + TYPE: FABRIC + VERSION: 1.21.1 + SERVER_NAME: uno + ONLINE_MODE: false + TZ: Europe/Berlin + + # Server Properties + OVERRIDE_SERVER_PROPERTIES: true + ENABLE_COMMAND_BLOCK: true + GAMEMODE: creative + FORCE_GAMEMODE: false + + # RCON Setup + RCON_PASSWORD: garde-studios + BROADCAST_CONSOLE_TO_OPS: true + BROADCAST_RCON_TO_OPS: true + + # Setup + FORCE_REDOWNLOAD: true + #MEMORY: 2G + INIT_MEMORY: 500M + MAX_MEMORY: 1G + USE_AIKAR_FLAGS: true + + # World & Mod Data + WORLD: https://file.cyperpunk.de/filebrowser/api/public/dl/4FDwjgd8/lobby.zip + #SEED: 795488740 + MODS_FILE: /extras/mods.txt + # Whitelisting Players + WHITELIST_FILE: /extras/whitelist.json + OVERRIDE_WHITELIST: true + ENFORCE_WHITELIST: false + + # Operator Setup + OPS_FILE: /extras/ops.json + SYNC_SKIP_NEWER_IN_DESTINATION: false + ports: + - 30001:25565 # Connection Port + - 9101:9100 # unified Exporter + volumes: + - ../fallback/data:/data + - ../fallback/mods.txt:/extras/mods.txt:ro + - ../fallback/ops.json:/extras/ops.json:ro + - ../fallback/whitelist.json:/extras/whitelist.json:ro + - ../fallback/config:/config + diff --git a/development/main-compose.yml b/development/main-compose.yml new file mode 100644 index 0000000..3ee7600 --- /dev/null +++ b/development/main-compose.yml @@ -0,0 +1,54 @@ +services: + dev_server: + image: itzg/minecraft-server + container_name: dev_server + restart: always + environment: + # What Server + EULA: "true" + TYPE: FABRIC + VERSION: 1.21.1 + SERVER_NAME: dev + ONLINE_MODE: false + TZ: Europe/Berlin + + # Server Properties + OVERRIDE_SERVER_PROPERTIES: true + ENABLE_COMMAND_BLOCK: true + GAMEMODE: creative + FORCE_GAMEMODE: false + LEVEL_TYPE: minecraft:large_biomes + + # RCON Setup + RCON_PASSWORD: garde-studios + BROADCAST_CONSOLE_TO_OPS: true + BROADCAST_RCON_TO_OPS: true + + # Setup + FORCE_REDOWNLOAD: true + INIT_MEMORY: 500M + MAX_MEMORY: 1G + USE_AIKAR_FLAGS: true + + # World & Mod Data + #WORLD: + SEED: -2202949464251781243 + MODS_FILE: /extras/mods.txt + # Whitelisting Players + WHITELIST_FILE: https://git.cyperpunk.de/Garde-Studios/Uno-MC/raw/branch/main/whitelist.json + OVERRIDE_WHITELIST: true + ENFORCE_WHITELIST: false + + # Operator Setup + OPS_FILE: https://git.cyperpunk.de/Garde-Studios/Uno-MC/raw/branch/main/ops.json + SYNC_SKIP_NEWER_IN_DESTINATION: false + ports: + - 30000:25565 # Connection Port + - 31066:25575 # Rcon + - 8090:8080 # Squaremap + - 9100:9100 # unified Exporter + volumes: + - ../main/data:/data + - ../main/squaremap:/data/squaremap + - ../main/mods.txt:/extras/mods.txt:ro + - ../main/config:/config diff --git a/main/.gitignore b/main/.gitignore index 3af0ccb..170ea4a 100644 --- a/main/.gitignore +++ b/main/.gitignore @@ -1 +1,4 @@ /data +/squaremap/data/ +/squaremap/locale/ +/squaremap/web/ diff --git a/main/compose.yml b/main/compose.yml index e314caa..2f0a594 100644 --- a/main/compose.yml +++ b/main/compose.yml @@ -8,7 +8,7 @@ services: EULA: "true" TYPE: FABRIC VERSION: 1.21.1 - SERVER_NAME: uno + SERVER_NAME: utopia ONLINE_MODE: false TZ: Europe/Berlin diff --git a/main/mods.txt b/main/mods.txt index 2f03a65..ff4adbf 100644 --- a/main/mods.txt +++ b/main/mods.txt @@ -2,7 +2,7 @@ https://cdn.modrinth.com/data/P7dR8mSH/versions/thGkUOxt/fabric-api-0.107.0%2B1.21.1.jar # Cloth Config API -https://cdn.modrinth.com/data/9s6osm5g/versions/7jtvrmVP/cloth-config-15.0.130-fabric.jar +https://cdn.modrinth.com/data/9s6osm5g/versions/HpMb5wGb/cloth-config-15.0.140-fabric.jar # Yungs API https://cdn.modrinth.com/data/Ua7DFN59/versions/DeaIlZ9A/YungsApi-1.21.1-Fabric-5.1.3.jar