#68 & #36 Refactor Minecraft config and envs

This commit is contained in:
Joey Hafner 2022-11-01 00:24:27 -07:00
parent be854aa304
commit 4b37285b8e
15 changed files with 138 additions and 181 deletions

View File

@ -0,0 +1,4 @@
MAX_MEMORY=12G
TYPE=FORGE
VERSION=1.18.2
FORGEVERSION=40.1.69

View File

@ -1,23 +0,0 @@
version: '3'
services:
bmcp:
image: itzg/minecraft-server:java17
container_name: minecraft_bmcp
environment:
- EULA=TRUE
- MAX_MEMORY=12G
- TYPE=FORGE
- VERSION=1.18.2
- FORGEVERSION=40.1.69
- OPS=jafner425
- ENABLE_RCON=true
- RCON_PASSWORD=${RCON_PASSWORD}
volumes:
- $DOCKER_DATA/bmcp2:/data:rw
networks:
- mc-router
restart: "no"
networks:
mc-router:
external: true

View File

@ -0,0 +1,114 @@
version: '3'
services:
router:
image: itzg/mc-router
container_name: minecraft_mc-router
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
restart: "no"
networks:
- mc-router
ports:
- 25565:25565
command: --mapping=vanilla.jafner.net=vanilla:25565,e9.jafner.net=e9:25565,fan.jafner.net=fan:25565,vanilla2.jafner.net=vanilla2:25565,bmcp.jafner.net=bmcp:25565 --api-binding=0.0.0.0:25566
bmcp:
image: itzg/minecraft-server:java17
container_name: minecraft_bmcp
env_file:
- minecraft.env
- bmcp.env
volumes:
- $DOCKER_DATA/bmcp2:/data:rw
networks:
- mc-router
restart: "no"
e9:
image: itzg/minecraft-server:latest
container_name: minecraft_e9
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
env_file:
- minecraft.env
- e9.env
volumes:
- $DOCKER_DATA/e9:/data:rw
networks:
- mc-router
restart: "no"
fan:
image: itzg/minecraft-server:java8
container_name: minecraft_fan
env_file:
- minecraft.env
- fan.env
environment:
- RCON_CMDS_STARTUP= |-
/pregen start gen radius Pregen SQUARE 0 0 500
- RCON_CMDS_FIRST_CONNECT= |-
/pregen pause
- RCON_CMDS_LAST_DISCONNECT= |-
/pregen continue
volumes:
- $DOCKER_DATA/fan:/data:rw
networks:
- mc-router
restart: no
vanilla:
image: itzg/minecraft-server:latest
container_name: minecraft_vanilla
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
env_file:
- minecraft.env
- vanilla.env
volumes:
- $DOCKER_DATA/vanilla:/data:rw
networks:
- mc-router
vanilla2:
image: itzg/minecraft-server:java8
container_name: minecraft_vanilla2
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
env_file:
- minecraft.env
- vanilla2.env
volumes:
- $DOCKER_DATA/vanilla2:/data:rw
networks:
- mc-router
networks:
mc-router:
external: true
volumes:
mc-router:

View File

@ -0,0 +1,4 @@
MAX_MEMORY=8G
TYPE=FORGE
VERSION=1.19.2
FORGEVERSION=43.1.34

View File

@ -1,31 +0,0 @@
version: '3'
services:
e9:
image: itzg/minecraft-server:latest
container_name: minecraft_e9
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
environment:
- EULA=TRUE
- MAX_MEMORY=8G
- TYPE=FORGE
- VERSION=1.19.2
- FORGEVERSION=43.1.34
- OPS=jafner425
- ENABLE_RCON=true
- RCON_PASSWORD=${RCON_PASSWORD}
volumes:
- $DOCKER_DATA/e9:/data:rw
networks:
- mc-router
restart: "no"
networks:
mc-router:
external: true

View File

@ -0,0 +1,4 @@
MAX_MEMORY=6G
TYPE=FORGE
VERSION=1.16.5
FORGEVERSION=36.2.39

View File

@ -1,29 +0,0 @@
version: '3'
services:
fan:
image: itzg/minecraft-server:java8
container_name: minecraft_fan
environment:
- EULA=TRUE
- MAX_MEMORY=6G
- TYPE=FORGE
- VERSION=1.16.5
- FORGEVERSION=36.2.39
- OPS=jafner425
- ENABLE_RCON=true
- RCON_PASSWORD=${RCON_PASSWORD}
- RCON_CMDS_STARTUP= |-
/pregen start gen radius Pregen SQUARE 0 0 500
- RCON_CMDS_FIRST_CONNECT= |-
/pregen pause
- RCON_CMDS_LAST_DISCONNECT= |-
/pregen continue
volumes:
- $DOCKER_DATA/fan:/data:rw
networks:
- mc-router
restart: no
networks:
mc-router:
external: true

View File

@ -1,3 +1,9 @@
# Volumes
DOCKER_DATA=/mnt/md0/minecraft
DOCKER_CONFIG=/home/joey/homelab/server/config/minecraft
# Env
EULA=TRUE
OPS=jafner425,mollymsmom,galaxysqvid
ENABLE_RCON=true
RCON_PASSWORD=eZJxnAxUa9qEacEZFKdU6cEL

View File

@ -1,25 +0,0 @@
version: '3'
services:
router:
image: itzg/mc-router
container_name: minecraft_mc-router
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
restart: "no"
networks:
- mc-router
ports:
- 25565:25565
command: --mapping=vanilla.jafner.net=vanilla:25565,e9.jafner.net=e9:25565,fan.jafner.net=fan:25565,vanilla2.jafner.net=vanilla2:25565,bmcp.jafner.net=bmcp:25565 --api-binding=0.0.0.0:25566
networks:
mc-router:
external: true
volumes:
mc-router:

View File

@ -1,21 +0,0 @@
[global_tags]
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
[[outputs.influxdb]]
urls = ["http://192.168.1.23:8086"]
database = "minecraft"
[[inputs.exec]]
name_override = "tickinfo"
commands = ["/data/get-tps.sh"]
timeout = "30s"
data_format = "json"
tag_keys = ["dim","tpt"]

View File

@ -0,0 +1,3 @@
MAX_MEMORY=4G
TYPE=VANILLA
VERSION=1.19

View File

@ -1,26 +0,0 @@
version: '3'
services:
vanilla:
image: itzg/minecraft-server:latest
container_name: minecraft_vanilla
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
environment:
- EULA=TRUE
- VERSION=1.19
- OPS=mollymsmom
- MAX_MEMORY=4G
volumes:
- $DOCKER_DATA/vanilla:/data:rw
networks:
- mc-router
networks:
mc-router:
external: true

View File

@ -0,0 +1,3 @@
MAX_MEMORY=8G
TYPE=VANILLA
VERSION=1.8

View File

@ -1,26 +0,0 @@
version: '3'
services:
vanilla2:
image: itzg/minecraft-server:java8
container_name: minecraft_vanilla2
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
environment:
- EULA=TRUE
- VERSION=1.8
- OPS=galaxysqvid
- MAX_MEMORY=8G
volumes:
- $DOCKER_DATA/vanilla2:/data:rw
networks:
- mc-router
networks:
mc-router:
external: true