Files
wekan/docs/Databases/ToroDB/PostgreSQL
Lauri Ojansivu 130af564c9 Docker image: distroless, with a Node.js entrypoint and no shell.
Artifact Hub's Trivy report of v13.30 listed 218 vulnerabilities in
ghcr.io/wekan/wekan, 214 of them in Debian packages WeKan never runs
(util-linux, login, tar, coreutils, systemd libraries, sqlite) with no
Debian fix to update to. The image is now gcr.io/distroless/cc-debian13
plus libatomic1, node, WeKan, FerretDB and the MongoDB tools; that base
scans at 55 findings, 2 HIGH. Distroless publishes no linux/386, so for
386 the same Debian 13 packages are assembled into scratch, each with
its dpkg record; the release workflow reads both bases from the
Dockerfile and the image keeps all seven platforms. The wekan user
stays 999:999.

With no shell, releases/ferretdb/wekan-entrypoint.mjs replaces
wekan-entrypoint.sh, with the same decisions, exported and tested. It
runs sqlite-recovery.mjs with its own node: the shell entrypoint ran
/build/node, which the image never had, so every start with the bundled
FerretDB stopped with status 127 since v11.52. It also makes cpu-exec's
qemu-user decision itself. The UCS migration launcher and tools, the
UCS hook's volume preparation (ucs-release.py), the MongoDB tool
launchers (symlinks to mongo-tools) and the Nextcloud capability check
run node instead of sh.

Thanks to xet7 !
2026-11-25 00:32:06 +02:00
..
2026-08-03 13:07:12 +03:00

What was ToroDB

ToroDB was made with Java. It was about replacing MongoDB with ToroDB/PostgreSQL or ToroDB/MySQL. ToroDB is not developed anymore.

Try FerretDB instead

https://blog.ferretdb.io/building-project-management-stack-wekan-ferretdb/

FerretDB https://www.ferretdb.com , https://github.com/FerretDB/FerretDB is made with Go. Why FerretDB is explained at https://docs.ferretdb.io/#why-do-we-need-ferretdb . It is about replacing MongoDB with FerretDB/PostgreSQL, using Microsoft DocumentDB https://github.com/microsoft/documentdb for additional compatibility.

There is old FerretDB/SQLite, community can maintain it, it's not developed currently by FerretDB: https://github.com/FerretDB/FerretDB/tree/main-v1 .

C89 SQLite has problems with concurrency, corruption etc.

It will help when updated SQLite made with Rust will have these issues fixed at https://github.com/tursodatabase/turso . Turso originally had fork of C89 SQLite C89 Open Contribution based fork of SQLite https://github.com/tursodatabase/libsql , where they added fixes, but they run into some limits, so they then moved the Turso Rust SQLite experiment to main tursodatabase GitHub org https://github.com/tursodatabase/turso like they say at https://www.youtube.com/watch?v=010OKqc3ObM . Turso is using simulator like https://tigerbeetle.com https://github.com/tigerbeetle/tigerbeetle to fix concurrency, corruption etc bugs. So when they get rewrite done, Rust based SQLite is drop-in replacement for C89 SQLite. It has same database syntax, etc. But it also works with high concurrent usage, does not corrupt data like C89 SQLite, that is verified with simulator.

Docker: Wekan to PostgreSQL read-only mirroring

Screenshot

Screenshot of PostgreSQL with LibreOffice

Install

  1. Install docker-compose.

  2. Clone this repo.

git clone https://github.com/wekan/wekan
cd torodb-postgresql
  1. IMPORTANT: In docker-compose.yml, to use Wekan on local network, change ROOT_URL=http://localhost to http://IPADRESS like http://192.168.10.100 or http://example.com

  2. OPTIONAL: In docker-compose.yml, change PostgreSQL database name, username and password from wekan to something else.

  3. Write:

docker-compose up -d
  1. Wekan is at http://IPADDRESS or http://example.com (port 80)

  2. PostgreSQL connection URL for LibreOffice is dbname=wekan hostaddr=127.0.0.1 port=15432 user=wekan password=wekan. In some other apps URL could be postgresql://127.0.0.1:15432/wekan , and Username: wekan, Password: wekan , or others if you changed those at docker-compose.yml. Do not write to PostgreSQL, as it's readonly mirror. Write to MongoDB or make changes in Wekan. If server port 15432 open, PostgreSQL can be accessed also remotely at local network at http://IPADDRESS:15432/wekan

  3. MongoDB is at 127.0.0.1:28017

  4. Wekan and databases bind to address 0.0.0.0 so could be also available to other computers in network. I have not tested this.

  5. Restore your MongoDB data.

Feedback

GitHub issue 787