AshDevFr / docker-spigot

MIT License
33 stars 18 forks source link

chmod -R causes delay with dynmap servers #4

Closed cedarrapidsboy closed 6 years ago

cedarrapidsboy commented 6 years ago

For servers running dynmap, the "chmod -R minecraft.minecraft" can cause a massive delay when starting the server. For example, my world has generated millions of dynmap files in the plugins folder. Server startup was delayed by multiple minutes.

Workarounds:

This is a great Minecraft docker solution. Thank you.

AshDevFr commented 6 years ago

Hi @cedarrapidsboy, thank you for using this image. I don't plan on using a DB for dynmap yet, but I'll look into it soon. I added an option to skip the chmod, just add SKIPCHMOD=true in your env:

docker run -d -e SKIPCHMOD=true

cedarrapidsboy commented 6 years ago

Thanks!

I pretty quickly ran into an issue disabling chmod in my earlier workaround -- I subsequently added a plugin and forgot to chmod manually, so startup failed a bit.

I switched dynmap from filetree to SQLite (single file DB) and startup is again fast with chmod enabled. SQLite requires only an edit to the dynmap configuration.txt file:

# Filetree storage (standard tree of image files for maps)
#type: filetree
# SQLite db for map storage (uses dbfile as storage location)
type: sqlite
dbfile: dynmap.db
AshDevFr commented 6 years ago

As using SQL with dynmap is just an option to change in the config file, I won't change the script. If the repository is mounted it is pretty easy to access the config file and change it.