Skip to content

Commit

Permalink
docs: add multi compose example and organized velocity/waterfall exam…
Browse files Browse the repository at this point in the history
…ples (#176)
  • Loading branch information
itzg authored May 15, 2024
1 parent fe0a284 commit e612d3d
Show file tree
Hide file tree
Showing 10 changed files with 315 additions and 13 deletions.
48 changes: 48 additions & 0 deletions docs/multi-compose-projects/proxy/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
server_connect_timeout: 5000
listeners:
- motd: ${CFG_MOTD}
priorities:
- server1
host: 0.0.0.0:25577
max_players: 1
force_default_server: false
tab_size: 60
tab_list: GLOBAL_PING
bind_local_address: true
ping_passthrough: false
query_enabled: false
query_port: 25577
proxy_protocol: false
remote_ping_cache: -1
network_compression_threshold: 256
permissions:
default:
- bungeecord.command.server
- bungeecord.command.list
admin:
- bungeecord.command.alert
- bungeecord.command.end
- bungeecord.command.ip
- bungeecord.command.reload
log_pings: true
connection_throttle_limit: 3
prevent_proxy_connections: false
timeout: 30000
player_limit: -1
ip_forward: false
groups:
md_5:
- admin
remote_ping_timeout: 5000
connection_throttle: 4000
log_commands: false
stats: 19659f49-ed6b-47e3-8b81-63bd14ade63a
online_mode: true
forge_support: false
servers:
server1:
address: server1-mc-1:25565
restricted: false
server2:
address: server2-mc-1:25565
restricted: false
22 changes: 22 additions & 0 deletions docs/multi-compose-projects/proxy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "3.8"

services:
proxy:
image: itzg/bungeecord
environment:
TYPE: WATERFALL
ports:
- "25565:25577"
networks:
- waterfall
volumes:
- ./config.yml:/config/config.yml
- data:/server

volumes:
data:

networks:
waterfall:
# to simplify sharing-by-name with across projects
name: waterfall
20 changes: 20 additions & 0 deletions docs/multi-compose-projects/server1/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: "3.8"

services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
TYPE: PAPER
ONLINE_MODE: false
networks:
- waterfall
volumes:
- data:/data

volumes:
data:

networks:
waterfall:
external: true
19 changes: 19 additions & 0 deletions docs/multi-compose-projects/server2/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: "3.8"

services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
TYPE: PAPER
ONLINE_MODE: false
networks:
- waterfall
volumes:
- data:/data

volumes:
data:
networks:
waterfall:
external: true
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
version: '3.5'

services:
mc:
image: itzg/minecraft-server
environment:
EULA: "TRUE"
ONLINE_MODE: "FALSE"
TYPE: PAPER
SYNC_SKIP_NEWER_IN_DESTINATION: false
volumes:
- ./paper-global.yml:/config/paper-global.yml
proxy:
image: itzg/bungeecord
environment:
Expand All @@ -15,7 +17,8 @@ services:
ports:
- "25565:25577"
volumes:
- ./velocity.toml:/server/velocity.toml
- ./velocity.toml:/config/velocity.toml:ro
- ./forwarding.secret:/config/forwarding.secret:ro
- proxy:/server

volumes:
Expand Down
1 change: 1 addition & 0 deletions docs/velocity/forwarding.secret
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ExampleForwardingSecret
130 changes: 130 additions & 0 deletions docs/velocity/paper-global.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# This is the global configuration file for Paper.
# As you can see, there's a lot to configure. Some options may impact gameplay, so use
# with caution, and make sure you know what each option does before configuring.
#
# If you need help with the configuration or have any questions related to Paper,
# join us in our Discord or check the docs page.
#
# The world configuration options have been moved inside
# their respective world folder. The files are named paper-world.yml
#
# Docs: https://docs.papermc.io/
# Discord: https://discord.gg/papermc
# Website: https://papermc.io/

_version: 29
block-updates:
disable-chorus-plant-updates: false
disable-mushroom-block-updates: false
disable-noteblock-updates: false
disable-tripwire-updates: false
chunk-loading-advanced:
auto-config-send-distance: true
player-max-concurrent-chunk-generates: 0
player-max-concurrent-chunk-loads: 0
chunk-loading-basic:
player-max-chunk-generate-rate: -1.0
player-max-chunk-load-rate: 100.0
player-max-chunk-send-rate: 75.0
chunk-system:
gen-parallelism: default
io-threads: -1
worker-threads: -1
collisions:
enable-player-collisions: true
send-full-pos-for-hard-colliding-entities: true
commands:
fix-target-selector-tag-completion: true
suggest-player-names-when-null-tab-completions: true
time-command-affects-all-worlds: false
console:
enable-brigadier-completions: true
enable-brigadier-highlighting: true
has-all-permissions: false
item-validation:
book:
author: 8192
page: 16384
title: 8192
book-size:
page-max: 2560
total-multiplier: 0.98
display-name: 8192
lore-line: 8192
resolve-selectors-in-books: false
logging:
deobfuscate-stacktraces: true
messages:
kick:
authentication-servers-down: <lang:multiplayer.disconnect.authservers_down>
connection-throttle: Connection throttled! Please wait before reconnecting.
flying-player: <lang:multiplayer.disconnect.flying>
flying-vehicle: <lang:multiplayer.disconnect.flying>
no-permission: <red>I'm sorry, but you do not have permission to perform this command.
Please contact the server administrators if you believe that this is in error.
use-display-name-in-quit-message: false
misc:
chat-threads:
chat-executor-core-size: -1
chat-executor-max-size: -1
compression-level: default
fix-entity-position-desync: true
load-permissions-yml-before-plugins: true
max-joins-per-tick: 5
region-file-cache-size: 256
strict-advancement-dimension-check: false
use-alternative-luck-formula: false
use-dimension-type-for-custom-spawners: false
packet-limiter:
all-packets:
action: KICK
interval: 7.0
max-packet-rate: 500.0
kick-message: <red><lang:disconnect.exceeded_packet_rate>
overrides:
ServerboundPlaceRecipePacket:
action: DROP
interval: 4.0
max-packet-rate: 5.0
player-auto-save:
max-per-tick: -1
rate: -1
proxies:
bungee-cord:
online-mode: true
proxy-protocol: false
velocity:
enabled: true
online-mode: true
secret: 'ExampleForwardingSecret'
scoreboards:
save-empty-scoreboard-teams: false
track-plugin-scoreboards: false
spam-limiter:
incoming-packet-threshold: 300
recipe-spam-increment: 1
recipe-spam-limit: 20
tab-spam-increment: 1
tab-spam-limit: 500
timings:
enabled: true
hidden-config-entries:
- database
- proxies.velocity.secret
history-interval: 300
history-length: 3600
server-name: Unknown Server
server-name-privacy: false
url: https://timings.aikar.co/
verbose: true
unsupported-settings:
allow-headless-pistons: false
allow-permanent-block-break-exploits: false
allow-piston-duplication: false
allow-tripwire-disarming-exploits: false
allow-unsafe-end-portal-teleportation: false
compression-format: ZLIB
perform-username-validation: true
watchdog:
early-warning-delay: 10000
early-warning-every: 5000
22 changes: 16 additions & 6 deletions docs/velocity.toml → docs/velocity/velocity.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Config version. Do not change this
config-version = "2.6"
config-version = "2.7"

# What port should the proxy be bound to? By default, we'll bind to all addresses on port 25577.
bind = "0.0.0.0:25577"

# What should be the MOTD? This gets displayed when the player adds your server to
# their server list. Only MiniMessage format is accepted.
motd = "<#09add3>A Velocity Server powered by Docker"
motd = "<#09add3>A Velocity Server"

# What should we display for the maximum number of players? (Velocity does not support a cap
# on the number of players online.)
Expand Down Expand Up @@ -34,15 +34,15 @@ prevent-client-proxy-connections = false
# 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 = "NONE"
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
Expand Down Expand Up @@ -72,11 +72,17 @@ 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.
mc = "mc:25565"
lobby = "mc:25565"

# In what order we should try servers when a player logs in or is kicked from a server.
try = [
"mc"
"lobby"
]

[forced-hosts]
# Configure your forced hosts here.
"localhost" = [
"lobby"
]

[advanced]
Expand Down Expand Up @@ -127,6 +133,10 @@ log-command-executions = false
# 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 = false
Expand Down
50 changes: 50 additions & 0 deletions docs/waterfall/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
server_connect_timeout: 5000
listeners:
- motd: ${CFG_MOTD}
priorities:
- lobby
host: 0.0.0.0:25577
max_players: 1
force_default_server: false
tab_size: 60
forced_hosts:
pvp.md-5.net: pvp
tab_list: GLOBAL_PING
bind_local_address: true
ping_passthrough: false
query_enabled: false
query_port: 25577
proxy_protocol: false
remote_ping_cache: -1
network_compression_threshold: 256
permissions:
default:
- bungeecord.command.server
- bungeecord.command.list
admin:
- bungeecord.command.alert
- bungeecord.command.end
- bungeecord.command.ip
- bungeecord.command.reload
log_pings: true
connection_throttle_limit: 3
prevent_proxy_connections: false
timeout: 30000
player_limit: -1
ip_forward: false
groups:
md_5:
- admin
remote_ping_timeout: 5000
connection_throttle: 4000
log_commands: false
stats: 19659f49-ed6b-47e3-8b81-63bd14ade63a
online_mode: true
forge_support: false
disabled_commands:
- disabledcommandhere
servers:
lobby:
address: mc:25565
restricted: false
motd: ${CFG_MOTD}
Loading

0 comments on commit e612d3d

Please sign in to comment.