- Add erikvl87/languagetool service on the internal network (port 8010, English only by default — change langsToLoad to add more) - 256 MB min / 512 MB max heap; healthcheck waits up to ~3 min for first startup while Java initialises - Server LANGUAGETOOL_URL hardwired to http://languagetool:8010/v2 — no character limits, no rate limits, fully private - Remove 40 000-char cap from lint route (not needed self-hosted) - Bump fetch timeout to 30 s for cold-start requests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
services:
|
||
server:
|
||
build: ./server
|
||
restart: unless-stopped
|
||
volumes:
|
||
- ./server_data:/app/data
|
||
- ./server_uploads:/app/uploads
|
||
environment:
|
||
- JWT_SECRET=${JWT_SECRET:-change-me-in-production}
|
||
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
|
||
- OLLAMA_URL=${OLLAMA_URL:-https://ai.binarygnome.com}
|
||
- OLLAMA_MODEL=${OLLAMA_MODEL:-gemma4:latest}
|
||
- OLLAMA_API_KEY=${OLLAMA_API_KEY:-}
|
||
- LANGUAGETOOL_URL=http://languagetool:8010/v2
|
||
extra_hosts:
|
||
- "host-gateway:host-gateway"
|
||
networks:
|
||
- internal
|
||
healthcheck:
|
||
test: ["CMD-SHELL", "node -e \"require('net').createConnection(3000).on('connect',()=>process.exit(0)).on('error',()=>process.exit(1))\""]
|
||
interval: 5s
|
||
timeout: 3s
|
||
retries: 10
|
||
start_period: 15s
|
||
|
||
languagetool:
|
||
image: erikvl87/languagetool
|
||
restart: unless-stopped
|
||
environment:
|
||
- Java_Xms=256m
|
||
- Java_Xmx=512m
|
||
# Add more languages (comma-separated) or remove this line to load all
|
||
- langsToLoad=en
|
||
networks:
|
||
- internal
|
||
healthcheck:
|
||
test: ["CMD-SHELL", "wget -qO- http://localhost:8010/v2/languages > /dev/null"]
|
||
interval: 10s
|
||
timeout: 5s
|
||
retries: 18 # LT takes ~30–60 s to start on first run
|
||
start_period: 90s
|
||
|
||
app:
|
||
build: ./frontend
|
||
restart: unless-stopped
|
||
depends_on:
|
||
server:
|
||
condition: service_healthy
|
||
networks:
|
||
- internal
|
||
ports:
|
||
- "127.0.0.1:3080:80"
|
||
|
||
networks:
|
||
internal:
|
||
driver: bridge
|
||
|
||
volumes:
|
||
server_data:
|
||
server_uploads:
|