Platform operations

The JOpt Platform runs as one Docker Compose project per host. This page describes how the stack is set up on a host, how the TourOptimizer copies run, and how health checks, metrics, logs, backups and the release flow of the images work. The components are listed in the JOpt Platform overview.

One stack per host

  • Every host runs the same compose files. A host differs only in its settings file; no host name is written into the code or the images.
  • The stack runs either with its own TLS at the proxy or behind a front proxy of the host.
  • The optional parts come as extra compose files: the MCP connector and the self-hosted geo providers. Without these files the stack has no such service.
  • Every container runs with CPU and memory limits.

TourOptimizer copies

  • TourOptimizer runs as a fixed number of copies, set in the settings file of the host. The proxy sends each API request to the least busy copy.
  • A copy that is stopped drains first: it takes no new jobs and hands its running jobs back to the queue, where another copy claims them (Jobs: the queue and the copies).
  • The queue metrics jopt_queue_jobs and jopt_run_slots are the input for an autoscaler on a cloud platform. Running on Azure or AWS describes the options.

Health checks

  • In auth mode the readiness check of TourOptimizer covers Keycloak, the secret store and Redis (Settings: health and metrics).
  • The dependency checks run in the background every 15 seconds. While a dependency is down, readiness answers 503.
  • When the dependency is back, TourOptimizer recovers without a restart.

Metrics and dashboards

  • TourOptimizer and GeoCoderRouter expose Prometheus metrics on a management endpoint that is never published.
  • Next to the queue metrics, the gauge jopt_dependency_up shows the state of each dependency.
  • Grafana shows the dashboards "JOpt usage", per tenant, and "JOpt dependencies".

Logs

  • TourOptimizer and GeoCoderRouter write either readable plain lines or structured JSON in the ECS format, one object per line. One setting in each of them switches the format.
  • Every string of a JSON line passes a redaction for keys and bearer tokens, stack traces included. No secret, token, license, request body or address reaches a log line.

Backups and restore

Backup once a day: dumps of the MongoDB databases and of the PostgreSQL databases of Keycloak and Infisical, encrypted while written, as a signed set that names its stack. Restore: a set from another stack is refused, the restore goes into empty volumes, and recorded deletions are applied again.

The diagram opens full size on click.

  • The MongoDB databases and the PostgreSQL databases of Keycloak and Infisical are dumped once a day and encrypted while they are written, so no dump lies on disk in clear text.
  • Each backup set names its stack and is signed. A restore refuses a set from another stack.
  • A restore goes into empty volumes.
  • When a tenant asks for the deletion of its data, the data is removed and the deletion is recorded. A restore of an older backup set applies the recorded deletions again, so the data does not come back.

Image releases

The release flow of an image: a release candidate tag builds the image and runs the tests, the guards and a Trivy scan; a candidate gets candidate tags only and is tested on a local production stack, pinned by digest; the final release builds nothing and copies the accepted digest to the release tag.

The diagram opens full size on click.

  • A release candidate tag builds the image and runs the tests, the guards and a vulnerability scan with Trivy. The scan fails the build on a fixable critical or high finding and on any secret in the image.
  • A candidate image is pushed under candidate tags only. Candidates are tested on a local production stack, pinned by digest.
  • The final release builds nothing. It copies the accepted digest to the release tag, after a check of the image labels and the software bill of materials.
  • The software bill of materials is a CycloneDX document attached to the image digest.
  • Base images are pinned by digest. TourOptimizer and GeoCoderRouter run on an Eclipse Temurin Java 25 runtime image on Alpine.
  • A published tag is never changed.
  • TourOptimizer and GeoCoderRouter are public on Docker Hub as dnaevolutions/jopt_touroptimizer and dnaevolutions/jopt_geocoderrouter, with one tag per release; the stack pins a version tag. The JOpt.Solve image is delivered with the stack.

Added: 2026-11-27 | Last updated: 2026-11-27