initial opencode commit

This commit is contained in:
2026-09-12 14:31:27 -06:00
parent a2deef0f5a
commit 09a5891364
30 changed files with 898 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# Managed by Ansible - minecraft role (Geyser bridge).
# Minimal config: Geyser merges these keys over its built-in defaults.
# The Java server shares the pod's network namespace, so it is reachable
# at 127.0.0.1:{{ minecraft_container_port }}.
bedrock:
address: 0.0.0.0
port: {{ geyser_port }}
clone-remote-port: false
enable-proxy-protocol: false
remote:
address: {{ geyser_remote_address }}
port: {{ minecraft_container_port }}
auth-type: {{ geyser_auth_type }}
allow-passthrough-motd: true
allow-passthrough-player-counts: true

View File

@@ -0,0 +1,18 @@
[Unit]
Description=Geyser Bedrock bridge container ({{ geyser_image }})
Wants=network-online.target
After=network-online.target
[Container]
Label=app=geyser
ContainerName=geyser
Pod=minecraft.pod
Image={{ geyser_image }}
Volume={{ minecraft_data_dir }}/geyser:/geyser:Z
[Service]
Restart=always
RestartSec=10
[Install]
WantedBy=default.target

View File

@@ -0,0 +1,33 @@
[Unit]
Description=Minecraft Java server container ({{ minecraft_image }})
Wants=network-online.target
After=network-online.target
[Container]
Label=app=minecraft-server
ContainerName=minecraft-server
Pod=minecraft.pod
Image={{ minecraft_image }}
Environment=EULA=TRUE
Environment=TYPE={{ minecraft_server_type }}
Environment=VERSION={{ minecraft_version }}
Environment=MEMORY={{ minecraft_memory }}
Environment=DIFFICULTY={{ minecraft_difficulty }}
Environment=MOTD={{ minecraft_motd }}
Environment=MAX_PLAYERS={{ minecraft_max_players }}
Environment=VIEW_DISTANCE={{ minecraft_view_distance }}
Environment=ONLINE_MODE={{ minecraft_online_mode }}
Environment=OVERRIDE_SERVER_PROPERTIES=TRUE
{% if minecraft_whitelist | length > 0 %}
Environment=ENABLE_WHITELIST=TRUE
Environment=WHITELIST={{ minecraft_whitelist }}
{% endif %}
Volume={{ minecraft_data_dir }}/data:/data:Z
Volume={{ minecraft_data_dir }}/backups:/backups:Z
[Service]
Restart=always
RestartSec=10
[Install]
WantedBy=default.target

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Minecraft pod (Java server + Geyser bridge)
[Pod]
PublishPort={{ minecraft_port }}:25565/tcp
{% if minecraft_udp | bool %}
PublishPort={{ minecraft_port }}:25565/udp
{% endif %}
{% if enable_geyser | bool %}
PublishPort={{ geyser_port }}:{{ geyser_port }}/udp
{% endif %}
[Install]
WantedBy=default.target