Make the container deployable on Dokploy

domains.json was written next to server.js, i.e. into the image filesystem,
so every redeploy discarded the domain -> glossary_id mappings. Its path is
now overridable via DOMAINS_FILE and the image defaults it to /app/data,
a subdirectory so that mounting a volume there does not shadow server.js
and index.html in /app.

Also adds a GET /health endpoint plus a Docker HEALTHCHECK that uses it. The
probe deliberately does not call DeepL, so an upstream DeepL outage does not
get the container restarted.

.gitignore is new; .env holds a real API key and was previously untracked
only by convention.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-31 11:38:53 +02:00
parent 92f44a2916
commit 34ee2856b2
5 changed files with 127 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
.env
.env.example
.env.testcopy
domains.json
data
node_modules
.git
*.md