fix: default ports 8470 (HTTP) / 4250 (NATS) to avoid clash with registry_api on 8420

This commit is contained in:
agent
2026-06-03 19:54:36 +02:00
parent cd02a52191
commit 888ff75236
4 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -19,7 +19,7 @@ entry_point: "cmd/membershipd"
dir_path: "projects/message_bus/apps/unibus" dir_path: "projects/message_bus/apps/unibus"
repo_url: "" repo_url: ""
service: service:
port: 8420 port: 8470
health_endpoint: /healthz health_endpoint: /healthz
health_timeout_s: 3 health_timeout_s: 3
systemd_unit: null systemd_unit: null
@@ -40,8 +40,8 @@ e2e_checks:
cmd: "CGO_ENABLED=0 go test ./..." cmd: "CGO_ENABLED=0 go test ./..."
timeout_s: 180 timeout_s: 180
- id: smoke - id: smoke
cmd: "CGO_ENABLED=0 go build -o /tmp/unibus_membershipd ./cmd/membershipd && /tmp/unibus_membershipd --http-port 8420 --nats-port 14222 --db /tmp/unibus_smoke.db --store-dir /tmp/unibus_blobs --nats-store /tmp/unibus_js &" cmd: "CGO_ENABLED=0 go build -o /tmp/unibus_membershipd ./cmd/membershipd && /tmp/unibus_membershipd --http-port 18470 --nats-port 14222 --db /tmp/unibus_smoke.db --store-dir /tmp/unibus_blobs --nats-store /tmp/unibus_js &"
health: "http://127.0.0.1:8420/healthz" health: "http://127.0.0.1:18470/healthz"
timeout_s: 30 timeout_s: 30
--- ---
@@ -87,7 +87,7 @@ Demo end-to-end con `go run` (NATS embebido, nada que instalar):
```bash ```bash
cd projects/message_bus/apps/unibus cd projects/message_bus/apps/unibus
# 1. Service de membresía/claves (NATS embebido en :4222, HTTP en :8420) # 1. Service de membresía/claves (NATS embebido en :4250, HTTP en :8470)
go run ./cmd/membershipd go run ./cmd/membershipd
# 2. En otra terminal: peer publicador (proceso) — publica ticks cada 1s # 2. En otra terminal: peer publicador (proceso) — publica ticks cada 1s
+2 -2
View File
@@ -27,8 +27,8 @@ import (
func main() { func main() {
var ( var (
natsURL = flag.String("nats-url", "nats://127.0.0.1:4222", "NATS url") natsURL = flag.String("nats-url", "nats://127.0.0.1:4250", "NATS url")
ctrlURL = flag.String("ctrl-url", "http://127.0.0.1:8420", "membershipd control-plane url") ctrlURL = flag.String("ctrl-url", "http://127.0.0.1:8470", "membershipd control-plane url")
roomSub = flag.String("room", "proc.test.ticks", "room subject to subscribe to") roomSub = flag.String("room", "proc.test.ticks", "room subject to subscribe to")
idFile = flag.String("id-file", "./local_files/chat.id", "identity file path") idFile = flag.String("id-file", "./local_files/chat.id", "identity file path")
demoEnc = flag.Bool("demo-encrypted", false, "run the encrypted forward-secrecy demo") demoEnc = flag.Bool("demo-encrypted", false, "run the encrypted forward-secrecy demo")
+2 -2
View File
@@ -24,10 +24,10 @@ import (
func main() { func main() {
var ( var (
natsURL = flag.String("nats-url", "", "external NATS url; empty starts an embedded server") natsURL = flag.String("nats-url", "", "external NATS url; empty starts an embedded server")
httpPort = flag.String("http-port", "8420", "HTTP port for the control-plane API") httpPort = flag.String("http-port", "8470", "HTTP port for the control-plane API")
dbPath = flag.String("db", "./local_files/unibus.db", "SQLite database path") dbPath = flag.String("db", "./local_files/unibus.db", "SQLite database path")
storeDir = flag.String("store-dir", "./local_files/blobs", "blob store directory") storeDir = flag.String("store-dir", "./local_files/blobs", "blob store directory")
natsPort = flag.Int("nats-port", 4222, "embedded NATS listen port (when --nats-url empty)") natsPort = flag.Int("nats-port", 4250, "embedded NATS listen port (when --nats-url empty)")
natsStore = flag.String("nats-store", "./local_files/jetstream", "embedded JetStream store dir") natsStore = flag.String("nats-store", "./local_files/jetstream", "embedded JetStream store dir")
) )
flag.Parse() flag.Parse()
+2 -2
View File
@@ -19,8 +19,8 @@ import (
func main() { func main() {
var ( var (
natsURL = flag.String("nats-url", "nats://127.0.0.1:4222", "NATS url") natsURL = flag.String("nats-url", "nats://127.0.0.1:4250", "NATS url")
ctrlURL = flag.String("ctrl-url", "http://127.0.0.1:8420", "membershipd control-plane url") ctrlURL = flag.String("ctrl-url", "http://127.0.0.1:8470", "membershipd control-plane url")
roomSub = flag.String("room", "proc.test.ticks", "room subject to publish to") roomSub = flag.String("room", "proc.test.ticks", "room subject to publish to")
idFile = flag.String("id-file", "./local_files/worker.id", "identity file path") idFile = flag.String("id-file", "./local_files/worker.id", "identity file path")
) )