Using the Services StackLink
| Service | Typical Use‑Case | Endpoint Example |
|---|---|---|
| PlantDB | Store plant image metadata, query experimental data. | http://plantimager.local/plantdb/scan/dataset_123 |
| P3DX | View a plant in 3D, interact with the scene. | http://plantimager.local/p3dx |
| P3DV | Run 3D reconstruction, view terminal sessions. | http://plantimager.local/p3dv |
| WebUI | Manage experiments, view real‑time imaging pipelines. | http://plantimager.local/webui |
Development DeploymentLink
Set up a local DNSLink
To route requests through a "fake" domain name for development purposes (in order to mimic the production setup), you can set up a local DNS on your machine (host) as follows:
- Pick a "fake" domain (e.g.
plantimager.local). - Add an entry to
/etc/hoststhat points that domain to127.0.0.1. - Tell Docker‑Compose to use the same host name by setting
SERVER_HOSTin the.envfile (or via the environment section). - Make sure the
plantimager_nginximage is built with that host name (SERVER_HOSTis passed as a Docker build arg).
Set up a local DNS serverLink
If you want to avoid editing /etc/hosts and want a more scalable solution (e.g. for multiple machines), you need to set up a DNS server.
-
Install and configure
dnsmasq:sudo apt-get install dnsmasq # Debian/Ubuntu # or brew install dnsmasq # macOS -
Create a configuration snippet:
# /etc/dnsmasq.d/dev.local address=/dev.mellitus.local/127.0.0.1 -
Restart
dnsmasq:sudo systemctl restart dnsmasq
Now any machine on the same network that uses the local DNS server will resolve dev.mellitus.local to 127.0.0.1.
Production DeploymentLink
-
Switch to the production network
Indocker-compose.ymlsetplantimager-nettoexternal: trueand create the network beforehand:shell script docker network create plantimager-net -
Use a real SSL certificate – Replace the
ssl_certvolume with a persistent cert volume mounted to/etc/nginx/ssl/. -
Persist data – Mount a real database volume for
plantdb(romi_db) and for P3DV (p3dv_cfg,webterm_users). -
Disable development ports – Remove or comment out the
ports:entries forplantdb,webui, etc. -
Deploy –
shell script docker compose -f docker-compose.yml up -d
The stack will now be reachable from the internet over HTTPS, with all services properly isolated on the plantimager-net.
SummaryLink
- NGINX is the traffic controller that forwards requests based on URL prefixes.
- PlantDB, P3DX, P3DV, and WebUI each run inside their own containers and expose their own WSGI/HTTP interfaces.
- Docker volumes keep data and certificates persistent, while the internal network (
plantimager-net) allows name‑based service discovery. - The
.envfile holds all host/port/prefix settings that keep the configuration consistent across all services.