From 860a662ebdfd9b2bd27a754283a25427d13fecbc Mon Sep 17 00:00:00 2001 From: bndw Date: Sat, 14 Feb 2026 12:34:00 -0800 Subject: feat: add example config for VPS deployment Add config.example.yaml based on .ship deployment setup: - gRPC on localhost:50051 - HTTP on localhost:8007 (not 8080) - Public URL: muxstr.x.bdw.to - Metrics enabled with dashboard - Auth/rate-limiting disabled by default Update .ship/service to use config file instead of individual flags: - Old: -db -grpc-addr -ws-addr -public-url flags - New: -config /var/lib/muxstr/config.yaml Deployment: Copy config.example.yaml to /var/lib/muxstr/config.yaml --- .ship/service | 2 +- config.example.yaml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 config.example.yaml diff --git a/.ship/service b/.ship/service index a8e30de..3166559 100644 --- a/.ship/service +++ b/.ship/service @@ -7,7 +7,7 @@ Type=simple User=muxstr WorkingDirectory=/var/lib/muxstr EnvironmentFile=/etc/ship/env/muxstr.env -ExecStart=/usr/local/bin/muxstr -db relay.db -grpc-addr localhost:50051 -ws-addr localhost:8007 -public-url muxstr.x.bdw.to +ExecStart=/usr/local/bin/muxstr -config /var/lib/muxstr/config.yaml Restart=always RestartSec=5s NoNewPrivileges=true diff --git a/config.example.yaml b/config.example.yaml new file mode 100644 index 0000000..93f6000 --- /dev/null +++ b/config.example.yaml @@ -0,0 +1,45 @@ +server: + grpc_addr: "localhost:50051" + http_addr: "localhost:8007" + public_url: "muxstr.x.bdw.to" + read_timeout: 30s + write_timeout: 30s + +database: + path: "relay.db" + +auth: + read: + enabled: false + allowed_npubs: [] + write: + enabled: false + allowed_npubs: [] + timestamp_window: 60 + skip_methods: [] + +rate_limit: + enabled: false + default_rps: 10.0 + default_burst: 20 + ip_rps: 5.0 + ip_burst: 10 + cleanup_interval: 5m + max_idle_time: 10m + +metrics: + enabled: true + addr: ":9090" + path: "/metrics" + namespace: "muxstr" + subsystem: "relay" + +logging: + level: "info" + format: "json" + output: "stdout" + +storage: + auto_compact: true + compact_interval: 24h + max_event_age: 0s -- cgit v1.2.3