Intro
The code is hosted on GitHub.
uBlog is written in Java. The project favors a small footprint and few dependencies over a conventional web stack. HTTP is handled directly with Java sockets rather than a web or application server. Markdown rendering and Mustache templates provide the presentation layer; the remaining application code is intentionally straightforward. Configuration has explicit defaults, and there is no database in the current runtime path.
The container starts the JVM with an 8 MB initial and maximum heap. That is a deliberately small starting point, not a performance guarantee: actual memory needs depend on the content, traffic, and runtime environment.
Current State
The application reads Markdown files from a root folder and its immediate category folders. Root-level entries appear in the menu, categories appear separately, and Index.md and Error.md are used for their special pages. The Mustache templates used to render the UI live under template/. Currently the final template must be set. Templates can be customized by a theme.properties file. If present, the properties are editable for the publisher via the user settings.
Users are loaded from property files in the user folder. Authenticated editing can create categories and entries and update existing entries, so the content and image folders must be writable for those operations. Password updates can also write to the user folder. The name of the users property file is used as the login username. The password can be set as plaintext initially and is encrpyted upon first authentication by the user. The password can be changed by the authenticated user via the user settings.
The Maven build produces a regular JAR and a shaded fat JAR. The Containerfile builds and runs the shaded JAR. The database-related environment variables documented previously are not used by the current application configuration.
Building the application
uBlog uses a standard maven build system. However, two of the referenced libraries are not yet available in Maven Central, jMustache template implementation and JDI - a minimalistic dependency framework for Java. The easiest way is to clone and build those libraries locally (they contain no other library reference) before building uBlog to get it in the local maven repository. Then the standard maven build can be executed.
mvn clean install
Executing the application
The project contains a run.sh script that can be used to build the application and also to execute with different UI configuration. Heap space in this case is set to 8MB.