halkyon/deploy/compose.languagetool.yaml
Tizian 「ティツィアーン」 3ac1880ac8
build(deploy)!: the instance's compose file is compose.learn.yaml, beside compose.train.yaml and compose.todo.yaml
No file has Compose's default name any more, so .env's COMPOSE_FILE is always set,
naming compose.learn.yaml first (.env.example sets it). compose.yaml stays as a link to
compose.learn.yaml for the one deploy that switches learn.halkyon.eu's .env over: the
deploy's merge runs with the COMPOSE_FILE from before. A later commit removes it.

BREAKING CHANGE: an instance's deploy/.env must set COMPOSE_FILE, starting with
compose.learn.yaml, before the link goes.

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

46 lines
2.1 KiB
YAML

# The LanguageTool sidecar (decided 2026-10-26, ADR 0024): LanguageTool's open-source
# server beside the instance, which checks spelling and grammar for Halkyon Learn (Check
# in the assistant's field, and underlines while writing). Switched on in .env:
#
# COMPOSE_FILE=compose.learn.yaml:compose.languagetool.yaml
#
# It has no site, unlike Jellyfin: LanguageTool has no sign-in of its own, so only the
# server reaches it, which checks who asks and how often, and keeps nothing. Its one
# folder on the server, ./languagetool/fasttext (the model it tells languages apart
# with, fetched at its first start), is owned by a user ID of its own, which no person,
# no other container and not the CI runner uses: processes of one user ID can read
# each other's environment and files. Setting it up: sidecars/README.md.
services:
languagetool:
# meyay/languagetool 6.8-13: LanguageTool 6.8 built from its tag (LanguageTool's own
# downloads end at 6.6), the version Halkyon Learn's checks are tried with.
image: meyay/languagetool@sha256:062924c66c649d706d60aed80af6bab207bb50a053733e7ac1ca0d8446d150f1
restart: unless-stopped
user: "61081:61081"
read_only: true
tmpfs:
# The configuration it writes at each start, and the native libraries Java
# unpacks and loads.
- /tmp:exec,size=64m,uid=61081,gid=61081
environment:
# Java's heap: 1.2 GB resident with fastText beside it, five languages loaded.
JAVA_XMS: 256m
JAVA_XMX: 1g
volumes:
- ./languagetool/fasttext:/fasttext
# On `edge` alone, beside Caddy and the server's public API, never beside Postgres;
# no published port, and no site in Caddy.
networks:
- edge
mem_limit: 2g
# No log at all: LanguageTool's names each check's length and language only, but
# what is written must never be kept, and a failing rule could name its sentence.
# To look into a failure, switch to journald for a while.
logging:
driver: none
server:
environment:
# The instance checks writing here (ADR 0024).
LANGUAGETOOL_URL: http://languagetool:8081/