Every container of Ambitwin running together on one machine
Caddy, Redis, Kafka, the services
Watch
Compose copies a saved file into the running container, or rebuilds it
Edit src/main.rs, telemetry restarts
Runtime file
compose.runtime.yml, written at each start, listing the compose files kept
The input of every just stack and just db recipe
Exclude
A word that leaves out every folder or service whose name contains it
simulator
Detached
Containers run in the background; the terminal is free
just stack start
How to start, look at, reset and stop Ambitwin on one machine, and on the local cluster. First-time setup comes before: Setting Up the Environment. How Compose is wired: Docker Compose.
Start and stop
Command
Runs
Files used
Terminal
just stack dev
Everything, with watch
each docker-compose.yml plus each docker-compose.dev.yml
Stays attached
just stack start
Everything, rebuilt, no watch
each docker-compose.yml only
Detached
just stack down
Stops and removes every container, ignoring any exclusion
the last runtime file
Returns
just stack logs [service]
Follows the logs, all or one
the last runtime file
Stays attached
Both dev and start run just stack env first. What just stack dev does, step by step: Docker Compose.
The dev files add, per service: the watch rules, a database port on the host, and a web page to browse the database.
Leaving parts out
Flag or word
Leaves out
--no-agent
The backend/agent folder: agent, agent-db and Langfuse
--no-metrics
prometheus, grafana
--no-simulators
sensor-simulator, aq-simulator, ap-simulator
--no-devices
ap-collector
Any bare word
Every folder and service whose name contains it
--build
Nothing: rebuilds the images first
--dry-run
Nothing: prints the docker compose command and stops
Example.just stack dev --no-simulators frontend:
Folders skipped: the three in simulators/, and frontend.
The runner prints excluded: simulators/aq-simulator, and so on, then the command it runs.
ap-collector still starts: it lives in devices/. It finds no simulated router and posts nothing.
A mistyped word is silent
A mistyped flag stops the run: unrecognized arguments: --no-metrcs. A mistyped word matches nothing, and every service starts. --dry-run shows the list before anything starts.
Addresses
Page
Address
When
Frontend
http://localhost:8080
Always
Edge, every API
http://localhost
Always
Keycloak, sign-in and admin console
http://localhost:8090
Always
Langfuse
http://localhost:3030, or http://localhost/langfuse, which redirects there
Without --no-agent
Grafana
http://localhost/grafana/
Without --no-metrics
Prometheus
http://localhost/prometheus/
Without --no-metrics
digital-twin database, Mongo Express
http://localhost/twin-db-gui/
dev only
telemetry database, pgweb
http://localhost/telemetry-db-gui/
dev only
notification database, Mongo Express
http://localhost/notification-db-gui/
dev only
dashboard database, Mongo Express
http://localhost/dashboard-db-gui/
dev only
chat database, Mongo Express
http://localhost/chat-db-gui/
dev only
Simulators
localhost:3001 sensor, :3002 air quality, :3003 routers
sequenceDiagram
autonumber
participant D as developer
participant Dk as docker
participant K3 as k3d
participant K as kubectl
D->>Dk: docker build, tag ghcr.io/nickghignatti/ambitwin-twin:latest
D->>K3: just k8s load
K3-->>K3: images copied into the cluster nodes
D->>K: just k8s restart digital-twin
K-->>D: new pod with the new image
D->>K: just k8s rollout digital-twin
K-->>D: rollout finished
just k8s load: imports all twelve images, so each must exist locally
4
just k8s restart digital-twin
6
just k8s rollout digital-twin
Every image builds from the repo root with -f backend/<service>/Dockerfile ., except frontend, which builds from ./frontend. The services read sibling folders, such as backend/libs/ and schemas/.