Frontend is a single page served from classpath resources with a JSON API alongside it. Kept separate from the MCP tools because the consumers differ: a model reads formatted text, a browser needs structures. Only the database is shared. The page has three views - catalog with edition details, copies, detected facts with evidence and a filterable file list; script search with FTS5 snippets and a viewer; and a format breakdown. No build step, no CDN, no dependencies; light and dark follow the system. New `serve` command puts the frontend and MCP on one port, one process and one database connection, which is also what the container runs. `mcp` alone still works for a headless setup. Docker is a two-stage build: JDK plus the Rex-EMoolator submodule to compile, JRE for runtime. installDist rather than build, so check - and with it verifyCoreVersion - is skipped and git is not needed in the image. The pinned :core tag is extracted from gradle.properties at build time and passed in by the entrypoint, otherwise copy.core_version would record "nieznana" and derived-artifact invalidation would stop working. Properties go through JAVA_OPTS because Gradle's launcher treats everything after the script name as application arguments. Compose mounts the collection read-only and keeps the database and script cache in a named volume. The port is bound to loopback. Not verified: the image itself does not build here, the Docker daemon is not running on this machine. The launcher, JAVA_OPTS handling and resource packaging were tested against the installDist output directly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
15 lines
634 B
Bash
Executable File
15 lines
634 B
Bash
Executable File
#!/bin/sh
|
|
# Launcher generowany przez Gradle traktuje wszystko po nazwie skryptu jako
|
|
# argumenty aplikacji, więc właściwości JVM muszą iść przez JAVA_OPTS.
|
|
set -e
|
|
|
|
# wersja :core jest przypięta submodułem w czasie budowania obrazu; bez niej
|
|
# copy.core_version zapisałoby "nieznana" i przestałoby działać unieważnianie
|
|
# cache'u pochodnych po bumpie emulatora
|
|
CORE_VERSION="${CORE_VERSION:-$(cat /app/core-version 2>/dev/null || echo nieznana)}"
|
|
|
|
JAVA_OPTS="-Dfile.encoding=UTF-8 -Dcatalog.data=${CATALOG_DATA:-/data} -Dcatalog.coreVersion=${CORE_VERSION} ${JAVA_OPTS}"
|
|
export JAVA_OPTS
|
|
|
|
exec /app/bin/rex-catalog "$@"
|