Switch from bind mounts to named docker volumes

This commit is contained in:
2026-01-16 05:31:55 +00:00
parent 8a214c9610
commit 379bb85a42
13 changed files with 130 additions and 97 deletions

30
scripts/init_volumes.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env sh
# Define a helper function that runs a command
# If the command fails, the script prints an error message
# and exits immediately.
run() {
# "$@" expands to all arguments passed to this function
# and preserves proper word splitting and quoting.
"$@" || {
echo "Error: command failed: $*" >&2
exit 1
}
}
# Ensure required directories exist
run mkdir -p /fabric_data/bluemap/web/maps
run mkdir -p /fabric_data/config/worldedit/schematics
run mkdir -p /paper_data/bluemap/web/maps
run mkdir -p /paper_data/plugins/WorldEdit/schematics
# Ensure correct permissions of docker volumes
run chown -R minecraft_server:minecraft_server /bluemap_data
run chown -R minecraft_server:minecraft_server /bluemap_web
run chown -R minecraft_server:minecraft_server /bluemap_maps
run chown -R minecraft_server:minecraft_server /fabric_data
run chown -R minecraft_server:minecraft_server /luckperms_data
run chown -R minecraft_server:minecraft_server /paper_data
run chown -R minecraft_server:minecraft_server /schematics
run chown -R minecraft_server:minecraft_server /velocity_data