Docker
eodia insights is built as a single image from the repository’s Dockerfile; it is
published on Docker Hub as eodia/insights. It contains the server — a Rust binary,
eodia-server, that serves the API, Trino’s OPA endpoint, MCP and the job queue — and the
interface; the argument given to the container chooses what it runs. docker-compose.prod.yml
puts this image together with PostgreSQL, Trino and Caddy. All configuration goes through
environment variables.
The image
Section titled “The image”docker build -t eodia-insights .It is based on Node 22 (for the interface) and Debian Bookworm, runs as the node user, and
starts its processes under tini. The server is compiled separately, in Rust, and copied into
/usr/local/bin (eodia-server, and eodia-mcp, standalone MCP over HTTP or stdio); the
interface is compiled by next build as standalone output. The image is built for linux/amd64
and linux/arm64.
| Role | Command | Port | What it does |
|---|---|---|---|
server | docker run eodia-insights server | 4100 | REST /api/v1, authentication, public pages, internal OPA endpoint, MCP on /mcp; the job queue with INPROCESS_WORKER=1 |
web | docker run eodia-insights web | 3100 | the Next.js interface |
worker | docker run eodia-insights worker | — | the job queue alone: synchronizations, dashboard pre-warming, subscriptions |
mcp | docker run eodia-insights mcp | 4200 | optional: MCP alone (eodia-mcp, port MCP_PORT), relaying to the API at API_URL; the server already serves /mcp |
all (default) | docker run eodia-insights | 3100, 4100 | server (with its job queue) and web in a single container |
The api role of earlier versions is still accepted, as a synonym of server.
In all mode, a small supervisor starts the two processes, prefixes their logs ([server],
[web]), forwards shutdown, and stops the whole container as soon as one of them dies: the
orchestrator then restarts it in full rather than leaving a half-alive instance running. It runs
the job queue inside the server (INPROCESS_WORKER=1, unless told otherwise). The interface
relays /api/* and /mcp to the server: the address shown in « API and MCP » answers without a
proxy in front.
The production deployment
Section titled “The production deployment”docker-compose.prod.yml runs one service per role:
| Service | Image | Role |
|---|---|---|
catalog | postgres:17-alpine | the application catalog (catalog-data volume) |
trino | trinodb/trino:483 | the engine; its authorizations are requested from the server |
server | eodia-insights | the API, the OPA endpoint, MCP and the job queue (INPROCESS_WORKER=1); applies migrations on startup |
web | eodia-insights | the interface |
render | gotenberg/gotenberg:8.20.1 | optional (render profile): subscriptions as PDF or image |
caddy | caddy:2-alpine | automatic HTTPS, ports 80 and 443 (caddy-data, caddy-config volumes) |
Startup order matters: the server waits for the catalog, but not for Trino — it must be
listening before Trino queries it. The interface waits for the server to answer its health check
(/api/health, port 4100).
docker compose -f docker-compose.prod.yml up -d --build # build and startdocker compose -f docker-compose.prod.yml logs -f server # follow the serverdocker compose -f docker-compose.prod.yml ps # status and health of the servicesdocker compose -f docker-compose.prod.yml down # stop (volumes are kept)IMAGE chooses the image used (default eodia-insights:latest); for the published image,
IMAGE=eodia/insights:0.8.0 for instance. In production, pin an exact version rather than
latest.
Trino reads three files from docker/trino/etc, mounted read-only:
| File | Contents |
|---|---|
config.properties | a coordinator that is also a worker; dynamic catalogs (catalog.management=dynamic) kept in memory (catalog.store=memory); 1 GB of memory per query |
access-control.properties | the opa access control, pointed at the server (${ENV:OPA_URL}): /allow, /batch, /row-filters, /column-masks |
jvm.config | the JVM options, including a 2 GB heap (-Xmx2G) |
Trino keeps nothing on disk: the application is the source of truth. It recreates the catalogs of all sources on startup, during the job queue’s periodic tasks (at most once a minute) if any are missing, and as soon as a query finds a catalog absent. A Trino restart therefore repairs itself.
The OPA endpoint address comes from OPA_URL, which the compose file builds:
http://server:4100/internal/opa/${OPA_SECRET}. The host name is that of the service running the
server: in a stack in all mode (a single insights service, say), it is
http://insights:4100/internal/opa/${OPA_SECRET}. After a change, recreate Trino
(docker compose up -d trino): it reads its environment only on startup.
docker/Caddyfile serves DOMAIN over HTTPS (Let’s Encrypt; ACME_EMAIL as the
contact), compresses responses, sets HSTS and a few security headers, then routes:
| Path | To |
|---|---|
/api/* | server:4100, unbuffered (the copilot and synchronization progress use SSE) |
/mcp* | server:4100, unbuffered |
/internal/* | 404 response: the OPA endpoint is never exposed |
| everything else | web:3100 |
Multiple workers
Section titled “Multiple workers”Jobs live in the PostgreSQL catalog. Several processes can run them together — the server with
INPROCESS_WORKER=1, and as many worker containers as you like: each one claims its own with
FOR UPDATE SKIP LOCKED, and a job whose worker has stopped is picked up by another. The
migrations are applied by the first process to start, server or worker, under a lock.
Backing up
Section titled “Backing up”Two things are enough to rebuild an instance:
- the catalog database (
catalog), for example withpg_dump; - the
SECRET_KEYkey: without it, the source passwords and embedding secrets in the backup cannot be read.
Trino has nothing to back up.
eodia insights is free software by Eodia.