summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-02-23 16:42:38 +0900
committerSho Sakuma <me@m1sk9.dev>2026-02-23 16:42:43 +0900
commit1265f5d6051fbf7942be2a913870bdd1bd5f24fe (patch)
tree56c5ca1db1126b66afb4c0a66e8d3262f57c0243
parent8b58b07dc968df68c5fa9b0f39cf2a071f6dc4cc (diff)
downloadLunaticChat-1265f5d6051fbf7942be2a913870bdd1bd5f24fe.tar.gz
LunaticChat-1265f5d6051fbf7942be2a913870bdd1bd5f24fe.tar.bz2
LunaticChat-1265f5d6051fbf7942be2a913870bdd1bd5f24fe.zip
chore: Support folia debug-server
-rw-r--r--docker/folia/.gitignore1
-rw-r--r--docker/folia/bukkit.yml (renamed from docker/bukkit.yml)0
-rw-r--r--docker/folia/compose.yaml47
-rw-r--r--docker/velocity/.gitignore (renamed from docker/.gitignore)0
-rw-r--r--docker/velocity/bukkit.yml43
-rw-r--r--docker/velocity/compose.yaml (renamed from docker/compose.yaml)0
-rw-r--r--docker/velocity/paper-global.yml (renamed from docker/paper-global.yml)0
-rw-r--r--docker/velocity/velocity.toml (renamed from docker/velocity.toml)0
-rwxr-xr-xx94
9 files changed, 165 insertions, 20 deletions
diff --git a/docker/folia/.gitignore b/docker/folia/.gitignore
new file mode 100644
index 0000000..16873f6
--- /dev/null
+++ b/docker/folia/.gitignore
@@ -0,0 +1 @@
+plugins/
diff --git a/docker/bukkit.yml b/docker/folia/bukkit.yml
index 2f44ae9..2f44ae9 100644
--- a/docker/bukkit.yml
+++ b/docker/folia/bukkit.yml
diff --git a/docker/folia/compose.yaml b/docker/folia/compose.yaml
new file mode 100644
index 0000000..dd3f38c
--- /dev/null
+++ b/docker/folia/compose.yaml
@@ -0,0 +1,47 @@
+services:
+ folia:
+ image: itzg/minecraft-server:java21
+ container_name: debug-folia
+ ports:
+ - "25565:25565"
+ - "25575:25575"
+ volumes:
+ - lunatic-debug-folia-data:/data
+ - ./plugins:/data/plugins
+ - ./bukkit.yml:/data/bukkit.yml
+ environment:
+ EULA: "TRUE"
+ TYPE: "FOLIA"
+ VERSION: "1.21.11"
+ MEMORY: "2G"
+
+ # デバッグ用高速化設定
+ LEVEL_TYPE: "flat"
+ VIEW_DISTANCE: "3"
+ SIMULATION_DISTANCE: "3"
+ GENERATE_STRUCTURES: "false"
+ SPAWN_PROTECTION: "0"
+ ALLOW_NETHER: "false"
+
+ # 権限関連
+ OVERRIDE_SERVER_PROPERTIES: "true"
+
+ ENABLE_RCON: "true"
+ RCON_PASSWORD: "minecraft"
+ RCON_PORT: 25575
+
+ DIFFICULTY: "peaceful"
+ MAX_PLAYERS: "3"
+ ONLINE_MODE: "false"
+ SYNC_SKIP_NEWER_IN_DESTINATION: "false"
+ healthcheck:
+ test: mc-health
+ start_period: 90s
+ interval: 10s
+ timeout: 5s
+ retries: 3
+ tty: true
+ stdin_open: true
+
+volumes:
+ lunatic-debug-folia-data:
diff --git a/docker/.gitignore b/docker/velocity/.gitignore
index 4c0fc30..4c0fc30 100644
--- a/docker/.gitignore
+++ b/docker/velocity/.gitignore
diff --git a/docker/velocity/bukkit.yml b/docker/velocity/bukkit.yml
new file mode 100644
index 0000000..2f44ae9
--- /dev/null
+++ b/docker/velocity/bukkit.yml
@@ -0,0 +1,43 @@
+# This is the Bukkit configuration file in Paper.
+# As you can see, there's actually not that much to configure without any plugins.
+#
+# If you need help with the configuration or have any questions related to Paper,
+# join us in our Discord or check the docs page.
+#
+# File Reference: https://docs.papermc.io/paper/reference/bukkit-configuration/
+# Docs: https://docs.papermc.io/
+# Discord: https://discord.gg/papermc
+# Website: https://papermc.io/
+
+spawn-limits:
+ monsters: 70
+ animals: 10
+ water-animals: 5
+ water-ambient: 20
+ water-underground-creature: 5
+ axolotls: 5
+ ambient: 15
+chunk-gc:
+ period-in-ticks: 600
+ticks-per:
+ animal-spawns: 400
+ monster-spawns: 1
+ water-spawns: 1
+ water-ambient-spawns: 1
+ water-underground-creature-spawns: 1
+ axolotl-spawns: 1
+ ambient-spawns: 1
+ autosave: 6000
+aliases: now-in-commands.yml
+settings:
+ warn-on-overload: true
+ permissions-file: permissions.yml
+ update-folder: update
+ plugin-profiling: false
+ connection-throttle: 4000
+ query-plugins: true
+ deprecated-verbose: default
+ shutdown-message: Server closed
+ minimum-api: none
+ use-map-color-cache: true
+ allow-end: false
diff --git a/docker/compose.yaml b/docker/velocity/compose.yaml
index 2f3d5c9..2f3d5c9 100644
--- a/docker/compose.yaml
+++ b/docker/velocity/compose.yaml
diff --git a/docker/paper-global.yml b/docker/velocity/paper-global.yml
index 4c01c4e..4c01c4e 100644
--- a/docker/paper-global.yml
+++ b/docker/velocity/paper-global.yml
diff --git a/docker/velocity.toml b/docker/velocity/velocity.toml
index 1b5b374..1b5b374 100644
--- a/docker/velocity.toml
+++ b/docker/velocity/velocity.toml
diff --git a/x b/x
index d8c998a..a1b5f29 100755
--- a/x
+++ b/x
@@ -2,51 +2,105 @@
set -e
-DOCKER_COMPOSE="docker compose -f docker/compose.yaml"
+DC_VELOCITY="docker compose -f docker/velocity/compose.yaml"
+DC_FOLIA="docker compose -f docker/folia/compose.yaml"
help() {
cat <<EOF
Usage: ./x <command> [options]
-Commands:
- start Build with gradlew and start docker compose
+Velocity environment (Paper s1 + s2 + Velocity proxy):
+ start Build Paper+Velocity and start all containers
start-s1 Build Paper and start only s1 container
restart Restart s1, s2 and velocity containers
- stop Stop docker compose
- clean Stop docker compose and remove volumes
+ stop Stop velocity environment
+ clean Stop velocity environment and remove volumes
rcon [server] Open rcon-cli for server container (default: s1)
Available servers: s1, s2
logs [server] Show server container logs (default: s1)
Available servers: s1, s2
- vlogs Show velocity container logs
+ vlogs Show velocity proxy container logs
+
+Folia environment (single Folia server):
+ folia start Build Paper and start Folia server
+ folia restart Restart Folia server
+ folia stop Stop Folia server
+ folia clean Stop Folia server and remove volumes
+ folia rcon Open rcon-cli for Folia server
+ folia logs Show Folia server logs
+
+General:
help Show this help message
EOF
}
+ensure_plugin_dir() {
+ mkdir -p "$1"
+}
+
+# --- Folia commands ---
+folia_cmd() {
+ case "${1:-}" in
+ start)
+ ./gradlew :platform-paper:clean :platform-paper:shadowJar
+ ensure_plugin_dir docker/folia/plugins
+ cp platform-paper/build/libs/*.jar docker/folia/plugins/
+ $DC_FOLIA up
+ ;;
+ restart)
+ $DC_FOLIA restart folia
+ ;;
+ stop)
+ $DC_FOLIA down
+ ;;
+ clean)
+ $DC_FOLIA down -v
+ ;;
+ rcon)
+ $DC_FOLIA exec folia rcon-cli
+ ;;
+ logs)
+ $DC_FOLIA logs -f folia
+ ;;
+ *)
+ echo "Unknown folia command: ${1:-}"
+ echo ""
+ help
+ exit 1
+ ;;
+ esac
+}
+
+# --- Main ---
case "${1:-}" in
+ folia)
+ folia_cmd "${2:-}"
+ ;;
start)
./gradlew :platform-paper:clean :platform-paper:shadowJar :platform-velocity:clean :platform-velocity:shadowJar
- # Copy built JARs to plugin directories
- cp platform-paper/build/libs/*.jar docker/plugins-paper-s1/
- cp platform-paper/build/libs/*.jar docker/plugins-paper-s2/
- cp platform-velocity/build/libs/*.jar docker/plugins-velocity/
- $DOCKER_COMPOSE up
+ ensure_plugin_dir docker/velocity/plugins-paper-s1
+ ensure_plugin_dir docker/velocity/plugins-paper-s2
+ ensure_plugin_dir docker/velocity/plugins-velocity
+ cp platform-paper/build/libs/*.jar docker/velocity/plugins-paper-s1/
+ cp platform-paper/build/libs/*.jar docker/velocity/plugins-paper-s2/
+ cp platform-velocity/build/libs/*.jar docker/velocity/plugins-velocity/
+ $DC_VELOCITY up
;;
start-s1)
./gradlew :platform-paper:clean :platform-paper:shadowJar
- # Copy built JAR to s1 plugin directory
- cp platform-paper/build/libs/*.jar docker/plugins-paper-s1/
- $DOCKER_COMPOSE up s1
+ ensure_plugin_dir docker/velocity/plugins-paper-s1
+ cp platform-paper/build/libs/*.jar docker/velocity/plugins-paper-s1/
+ $DC_VELOCITY up s1
;;
restart)
- $DOCKER_COMPOSE restart s1 s2 velocity
+ $DC_VELOCITY restart s1 s2 velocity
;;
stop)
- $DOCKER_COMPOSE down
+ $DC_VELOCITY down
;;
clean)
- $DOCKER_COMPOSE down -v
+ $DC_VELOCITY down -v
;;
rcon)
SERVER="${2:-s1}"
@@ -54,7 +108,7 @@ case "${1:-}" in
echo "Error: Invalid server '$SERVER'. Available servers: s1, s2"
exit 1
fi
- $DOCKER_COMPOSE exec $SERVER rcon-cli
+ $DC_VELOCITY exec "$SERVER" rcon-cli
;;
logs)
SERVER="${2:-s1}"
@@ -62,10 +116,10 @@ case "${1:-}" in
echo "Error: Invalid server '$SERVER'. Available servers: s1, s2"
exit 1
fi
- $DOCKER_COMPOSE logs -f $SERVER
+ $DC_VELOCITY logs -f "$SERVER"
;;
vlogs)
- $DOCKER_COMPOSE logs -f velocity
+ $DC_VELOCITY logs -f velocity
;;
help|"")
help