change domains, ips and make flake check work
This commit is contained in:
@@ -9,15 +9,28 @@ and CI/CD pipelines for the project. Everything is one `flake.nix`.
|
||||
|
||||
Three hosts (see issue #21 for the full design discussion):
|
||||
|
||||
| Host | Role | Public hostname |
|
||||
| ------------- | ----------------------------------------- | ---------------------- |
|
||||
| `mqtt-ingest` | HiveMQ CE + Go MQTT→Postgres ingester | `ingest.ge-bos.de` |
|
||||
| `db-host` | Postgres 17 + TimescaleDB (telemetry+auth)| internal only |
|
||||
| `app-host` | Caddy + Kong + Supabase (compose) + SPA | `app.ge-bos.de`, `api.ge-bos.de` |
|
||||
| Host | Role | Public hostname | Private IP |
|
||||
| ------------- | ----------------------------------------- | ---------------------- | ---------- |
|
||||
| `mqtt-ingest` | HiveMQ CE + Go MQTT→Postgres ingester | `ingest.gebos.online` | `10.0.0.4` |
|
||||
| `db-host` | Postgres 17 + TimescaleDB (telemetry+auth)| `db.gebos.online` (SSH only) | `10.0.0.2` |
|
||||
| `app-host` | Caddy + Kong + Supabase (compose) + SPA | `app.gebos.online`, `api.gebos.online` | `10.0.0.3` |
|
||||
|
||||
Public REST surface is PostgREST + SQL `/rpc/` functions, fronted by Kong, TLS-terminated by Caddy.
|
||||
Supabase Studio is bound to `127.0.0.1` on `app-host` — reach it with `ssh -L 3000:127.0.0.1:3000 app-host`.
|
||||
|
||||
### Networking
|
||||
|
||||
There is no private DNS. Each host has a public hostname (used for `deploy-rs`
|
||||
SSH access from the Gitea runner, which is **not** on the private network, plus
|
||||
TLS ingress where applicable), and a static `10.0.0.0/8` IP used for all
|
||||
host-to-host traffic:
|
||||
|
||||
- `db.gebos.online` is for SSH/deploy only — Postgres is never exposed publicly.
|
||||
- `app-host` and `mqtt-ingest` reach Postgres at `10.0.0.2:5432` over the private
|
||||
network.
|
||||
- `db-host` only accepts Postgres (port 5432) from `10.0.0.0/8` (firewall rule
|
||||
in `nix/hosts/db-host.nix`).
|
||||
|
||||
## Repo layout
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user