Document live GitOps production deployment
build / build (push) Successful in 2m48s

This commit is contained in:
2026-09-15 18:42:09 +02:00
parent 645c00d8de
commit 61d6d21d88
3 changed files with 37 additions and 8 deletions
+21 -2
View File
@@ -52,6 +52,24 @@ SHA, available from `/api/version`.
The workflow requires the repository secrets `HARBOR_ROBOT_USER` and `HARBOR_ROBOT_TOKEN`. It only
pushes images and intentionally has no Kubernetes credentials.
## Production deployment
Production is GitOps-managed at **https://btcprice.k8s.pmagnus.cloud**:
```text
git push → Gitea Actions on anvil → Harbor → Flux → k3s → ingress-nginx → Traefik TLS
```
Flux image automation commits the newest approved `main-<UTC timestamp>` image to the separate
`magnus/deploy` repository. The manifests are in `../deploy/apps/btcprice`, and two replicas run with
one pod on each k3s node. CI never receives cluster credentials. Do not deploy production with
Docker Compose or manual `kubectl apply`; rollback by reverting the immutable image change in the
GitOps repository.
btcdata remains an external dependency running on citadel. Kubernetes represents it with a
selectorless Service and EndpointSlice, so pods use `http://btcdata:4102` without embedding its IP in
the Deployment.
## Legacy deployment (citadel)
```bash
@@ -64,8 +82,9 @@ architecture (citadel is x86_64 → `linux/amd64`), copies `docker-compose.citad
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 running
on citadel as well. Both attach to the external `btc-network` there, so `BTCDATA_URL` is
The temporary migration fallback listens on **http://192.168.50.195:4041** and proxies to the
btcdata running on citadel as well. It is retained only for the validation/rollback window; the
Kubernetes hostname is the production endpoint. Both attach to the external `btc-network` there, so `BTCDATA_URL` is
`http://btcdata:4102` (set in `.env.citadel`) — the service name inside the network, not a LAN
address. The deploy script creates `btc-network` on the host if it does not exist yet.