halkyon/deploy/brouter/Dockerfile
Tizian 「ティツィアーン」 a8f7c26e69
build(train): Train's server and BRouter deployable beside the instance (ADR 0030, D46)
deploy/compose.train.yaml adds Train's server at train.halkyon.eu, a
member of Learn's register, with its database halkyon_train in the
instance's PostgreSQL, and BRouter beside it alone (v1.7.10, checked by
SHA-256, no log), its segments of the operator's region kept current
monthly. Nothing changes until deploy/.env names the compose file:
redeploy.sh and backup.sh take Train in only then, and the operator's
steps are in sidecars/README.md. restic now forgets snapshots grouped by
host alone, so adding Train's dump leaves no group behind for good.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-30 15:53:01 +01:00

32 lines
1.6 KiB
Docker

# BRouter for Train's routes (ADR 0030, D11, D44, D46): its release, checked against
# GitHub's SHA-256 of it, on Eclipse Temurin's Java 17 as BRouter's own image, with
# its profiles and Train's running profile. Built from the repository root:
#
# docker build -f deploy/brouter/Dockerfile .
#
# The same image refreshes the segments (segments.sh), so it carries curl.
FROM eclipse-temurin:17-jre-noble
# BRouter v1.7.10, released 17 Jul 2026.
ADD --checksum=sha256:023fec3ba997758e8cd7ab9e1bae52e962af3f00b57683e3de86b84ffad01532 \
https://github.com/abrensch/brouter/releases/download/v1.7.10/brouter-1.7.10.zip /tmp/brouter.zip
RUN apt-get update \
&& apt-get install -y --no-install-recommends unzip curl ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& unzip -q /tmp/brouter.zip -d /tmp \
&& mkdir -p /app \
&& mv /tmp/brouter-1.7.10/brouter-1.7.10-all.jar /app/brouter.jar \
&& mv /tmp/brouter-1.7.10/profiles2 /profiles2 \
&& rm -rf /tmp/brouter.zip /tmp/brouter-1.7.10
COPY apps/train/brouter/halkyon-run.brf /profiles2/halkyon-run.brf
COPY --chmod=755 deploy/brouter/segments.sh /app/segments.sh
WORKDIR /app
EXPOSE 17777
# Segments in /segments4 (a volume), profiles in the image, no custom profiles; four
# routes at a time, each stopped after a minute. -Xmx as BRouter's script raised: the
# memory a route takes grows with its length, and Europe's long routes need more than
# its 128 MB.
CMD ["java", "-Xmx384M", "-Xms128M", "-Xmn16M", "-DmaxRunningTime=60", "-DuseRFCMimeType=false", "-DusePOSTRequests=false", \
"-cp", "/app/brouter.jar", "btools.server.RouteServer", "/segments4", "/profiles2", "/tmp", "17777", "4", "0.0.0.0"]