TRXTD/server
Tronax d400a4a2a0
fix(docker): harden data-dir permissions and surface actionable DB errors
The bind-mount permission fix only takes effect after a rebuild, so a
stale image keeps failing with the opaque "unable to open database file".
This hardens both sides so any remaining failure is self-explanatory:

- docker-entrypoint.sh: fall back to chmod 777 when chown is unsupported
  (network/9p mounts), and fall back to running as root when su-exec is
  unavailable, so the data dir is always writable on any filesystem.
- server/db.mjs: wrap the DatabaseSync open in a try/catch and, on
  failure, report the exact path, whether the directory is writable, and
  the process UID instead of the bare SQLite error.

Verified with a real container: a normal bind mount serves /health and
creates trxtd.db; a read-only mount now prints the directory-permission
diagnostic instead of the raw SQLite error.
2026-08-16 16:40:45 +02:00
..
db.mjs fix(docker): harden data-dir permissions and surface actionable DB errors 2026-08-16 16:40:45 +02:00
server.mjs feat: account system, OIDC, meta-progression research tree, and automated tests 2026-08-16 16:22:38 +02:00