Allow the CLI version to work without Minecraft world
yqs112358 opened this issue ยท 2 comments
Currently the cli version (and docker container) requires the world folder to work, which is very inconvinent for servers that host BlueMap at the different machine from the game itself.
Actually in my point of view, Bluemap can split it's functions into two main parts: Renderer & Viewer.
- The Renderer reads the world folder and generates map tiles into filesystem / sql-db. This part must require the map folder to work and should be deployed together with the game server
- The Viewer reads the map tiles generated from database and show them on front-end web pages. This part has nothing to do with the world folder, so it can be deployed on either the same or the different server from the game.
The server-side mod can contain both the Renderer and Viewer, and allows the user to turn off the Viewer part to just do the map rendering work. Similarily, the CLI version should allows the user to turn off the Renderer part and just act as a Viewer backend reading map tiles from the database and providing them to the frontend.
This fully decouples these two main function parts.
Isn't it now possible to use nginx+php backend to deploy Bluemap webapps separately?
In fact, the current php-backend design has not really removed the need for a backend service. Users still need to install PHP and run a sql.php backend to read map tiles from the database.
In that case, why not just directly run a Java Viewer backend (webapp+webserver)?
This would obviously relieve developers of the hassle of maintaining sql.php separately. Moreover, mc server maintainers are usually more knowledgeable about java, so the unfamiliarity with php may lead to misconfigurations, which could pose a security risk to their backend servers and databases.
All of what you suggested is already possible ^^
You can configure the maps without a world which makes bluemap display them on the webapp without loading/rendering/updating them and you can only start the integrated webserver with java -jar bluemap-cli.jar -w
If you need support with this, please visit our support-discord :)