---
module: platform.deployment
title: Deployment Topology & bcos.dev
tab: Overview
order: 30
audience: dev
---

> **DRAFT · internal** (2026-07-01). Server paths verified today; re-check before prod actions.

## Environments
- **bcos.dev** — all-in-one dev/staging on VM **`173.231.195.251`**. Registry `registry.bcos.dev`
  (user `hiveiq`, pw in memory). Domains `*.bcos.dev`.
- **Production** — OpenMetal; services VM **`173.231.195.250`**, Postgres on a **separate** VM
  `10.10.10.188` (ProxyJump). Registry `registry.bcos.cloud`. Domains `*.bcos.cloud`.

## Where config lives vs. where deploys run (this bit me 2026-06-30)
- **Source of truth for bcos.dev config = the `develop` branch of `hiveiq-openmetal-dev`**
  (`/source/hiveiq-ops/hiveiq-openmetal/hiveiq-openmetal-dev/hiveops/instances/dev/`).
- The `dev` folder still inside `hiveiq-openmetal-prod` is **legacy — do not use it.**
- **Deploys RUN on `.251` from** `~/hiveiq/hiveops-openmetal/hiveops/instances/dev/` (a deployed
  clone named `hiveops-openmetal` — note `hiveops` on the box vs `hiveiq` in the source repo).
  That is the correct stack the running nginx + containers use.
- Live VM edits must be **committed back to `hiveiq-openmetal-dev`** or they drift.

## Deploy a service to bcos.dev
```bash
cd /source/hiveops-src/hiveops-<svc>
./build.sh --registry registry.bcos.dev --push          # tag :dev
ssh -i ~/.ssh/id_ed25519_hiveiq bcosadmin@173.231.195.251
cd ~/hiveiq/hiveops-openmetal/hiveops/instances/dev
docker compose pull hiveiq-<svc> && docker compose up -d hiveiq-<svc>
```

## nginx routing gotchas
- API routes live in `.../instances/dev/nginx/conf.d/api.conf` (bind-mounted into `hiveiq-nginx`).
- Backends are set per-location: `set $backend "hiveiq-<svc>:<port>"` then `proxy_pass`. **Include
  the port** — a port-less upstream (`hiveiq-guide-backend` with no `:8099`) proxies to :80 → 502.
  (Exact bug, 2026-07-01.)
- After recreating a container, nginx may hold a **stale upstream** → reload: `docker exec
  hiveiq-nginx nginx -t && docker exec hiveiq-nginx nginx -s reload`.
- Per-domain confs must use blue/green **map vars**, not hardcoded hostnames, or they 502.

## Deploy = smoke test
"Deployed" is only true after a curl of the changed endpoint against the live URL returns 200 +
a parseable body. A green/healthy container is not a smoke test.
