46 lines
2.1 KiB
YAML
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.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/
|