Add citadel deployment

Port of ../elprice/deploy-citadel.sh: build the image locally for the
remote's architecture, ship it over SSH with docker save | docker load,
and run docker compose up -d --no-build in /home/pmp/apps/btcprice.

The deployment compose is standalone rather than joining btc-network,
because citadel runs no btcdata — BTCDATA_URL points at the instance
already running on omarchy (http://192.168.50.42:4102).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdMTk61JgUdNH86ttMi4ce
This commit is contained in:
2026-09-10 14:24:38 +02:00
co-authored by Claude Opus 5
parent e15f00e98c
commit 2af8b6f62d
5 changed files with 98 additions and 1 deletions
+22 -1
View File
@@ -37,13 +37,34 @@ cd ../btcprice && docker compose up -d
Inside `btc-network`, btcprice reaches btcdata as `http://btcdata:4102`.
## Deployment (citadel)
```bash
./deploy-citadel.sh
```
Same method as `../elprice/deploy-citadel.sh`: builds the image locally for the target's
architecture (citadel is x86_64 → `linux/amd64`), copies `docker-compose.citadel.yml` and
`.env.citadel` to `/home/pmp/apps/btcprice` on the host as `docker-compose.yml` / `.env`,
pipes the image over SSH with `docker save | docker load`, and runs
`docker compose up -d --no-build`. No registry involved.
Deployed btcprice listens on **http://192.168.50.195:4041** and proxies to the btcdata already
running on omarchy (`http://192.168.50.42:4102`, set via `BTCDATA_URL` in `.env.citadel`) —
citadel runs no btcdata of its own, so the deployment compose is standalone with no
`btc-network`.
Overridable: `BTCPRICE_DEPLOY_HOST`, `BTCPRICE_DEPLOY_DIR`, `BTCPRICE_IMAGE_NAME`,
`BTCPRICE_PLATFORM`.
## Environment Variables
| Variable | Default | Description |
|---|---|---|
| `BTCDATA_URL` | `http://localhost:4100` | btcdata service URL the server proxies to |
| `BTCDATA_LOCAL_URL` | — | Used by `make run-local` instead of `BTCDATA_URL` |
| `DOCKER_BTCDATA_PORT` | `4102` | btcdata's port inside `btc-network` (compose only) |
| `DOCKER_BTCDATA_PORT` | `4102` | btcdata's port inside `btc-network` (local compose only) |
| `BTCPRICE_PORT` | `4041` | Host port in the citadel deployment (`.env.citadel`) |
The HTTP port is not configurable via environment: `make run` hardcodes 4000 and the Docker
image's `CMD` hardcodes 4040.