Deployment (Docker)¶
Production deployment is defined by docker-compose.yml (and
docker-compose.prod.yml for the hardened production profile). This page
is an overview; for details see: Docker Architecture
(services, ports, volumes, healthcheck details), Docker Image & Container
(how images are built, tag logic) and Update / Rollback
(container lifecycle, real commands).
Services¶
| Service | Image | Description |
|---|---|---|
mongo |
mongo:7 |
Persistent data, only runs with the managed-mongo profile, bound to 127.0.0.1 only |
backend |
iqvflex/backend/Dockerfile (node:22-alpine) |
Node.js/Express, /health |
frontend |
dashboard/Dockerfile (node:22-alpine → nginx:1.27-alpine) |
Vite SPA + backend reverse proxy, single entry point |
Using ./install.sh / .\install.ps1 instead of docker compose up
directly is recommended — the scripts automate .env generation, image
build and healthcheck verification.
Manual Docker commands (development)¶
docker compose config # validate configuration
docker compose build # build images
docker compose up -d # start services
docker compose logs -f # follow logs
docker compose ps # SERVICE / STATUS / PORTS / HEALTH
Environment variables¶
| Variable | Default | Description |
|---|---|---|
FRONTEND_PORT |
8080 |
Single entry point (nginx) |
BACKEND_PORT |
3001 |
Bound to 127.0.0.1 only |
MONGO_PORT |
27017 |
Bound to 127.0.0.1 only |
MONGODB_URI |
(empty) | If empty, the managed MongoDB is used |
GO_API_BASE_URL |
(required) | Address of the external Go service |
COMPOSE_PROFILES |
managed-mongo |
Leave empty to use an external MongoDB |
VITE_API_BASE_URL |
(empty) | Empty in Docker: same-origin is used |
Using an external MongoDB¶
MONGODB_URI=mongodb://<USER>:<PASSWORD>@<HOST>:27017
COMPOSE_PROFILES=
When COMPOSE_PROFILES is emptied, the managed MongoDB service never
runs; the compose configuration remains valid.
Health checks¶
Health checks are not process checks — a real HTTP response is verified.
| What | Address | Expected |
|---|---|---|
| Backend | http://localhost:8080/health |
200 + data.status == "ok" |
| Frontend (nginx) | http://localhost:8080/__nginx_health |
200 |
| MongoDB | container healthcheck | db.adminCommand('ping').ok |
curl http://localhost:8080/health
nginx proxies three prefixes to the backend: /health, /erp-mapping,
/api/. All other paths fall through to the SPA (React Router).
Hardened production profile¶
./install.sh --profile prod # Linux
.\install.ps1 -DeployProfile prod # Windows
docker-compose.prod.yml never exposes the database and backend ports
externally, makes the backend root filesystem read-only, and applies
memory limits. nginx becomes the single entry point.
Update and removal¶
See Getting Started.