diff --git a/.claude/commands/release.md b/.claude/commands/release.md index 48e0246..e7dc6e4 100644 --- a/.claude/commands/release.md +++ b/.claude/commands/release.md @@ -49,21 +49,25 @@ If no argument provided, default to `patch`. GIT_SSH_COMMAND="ssh -i ~/.ssh/gitmlekudev" git push ssh://mleku@git.mleku.dev:2222/mleku/next.orly.dev.git main --tags ``` -11. **Deploy to relay.orly.dev** (ARM64): +11. **Deploy monolithic binary to relay.orly.dev** (ARM64): + Build and deploy the unified `orly` binary - a fully self-contained relay with all components embedded: + - Embedded Badger/Neo4j database + - Embedded ACL engine (follows, managed, curating modes) + - Embedded NIP-77 negentropy sync + - All subcommands (db, acl, relay) for split-mode if needed + Build on remote (faster than uploading cross-compiled binary due to slow local bandwidth): ```bash - ssh relay.orly.dev 'cd ~/src/next.orly.dev && git pull origin main && GOPATH=$HOME CGO_ENABLED=0 ~/go/bin/go build -o ~/.local/bin/next.orly.dev && sudo /usr/sbin/setcap cap_net_bind_service=+ep ~/.local/bin/next.orly.dev && sudo systemctl restart orly && ~/.local/bin/next.orly.dev version' + ssh relay.orly.dev 'cd ~/src/next.orly.dev && git pull origin main && GOPATH=$HOME CGO_ENABLED=0 ~/go/bin/go build -o ~/.local/bin/orly ./cmd/orly' + ssh root@relay.orly.dev '/usr/sbin/setcap cap_net_bind_service=+ep /home/mleku/.local/bin/orly && systemctl restart orly' + ssh relay.orly.dev '~/.local/bin/orly version' ``` - Note: setcap must be re-applied after each binary rebuild to allow binding to ports 80/443. -12. **Build and deploy monolithic binary** (ARM64): - Build the unified `orly` binary which includes all subcommands (db, acl, sync, launcher, relay) in a single binary: - ```bash - ssh relay.orly.dev 'cd ~/src/next.orly.dev && GOPATH=$HOME CGO_ENABLED=0 ~/go/bin/go build -o ~/.local/bin/orly ./cmd/orly && ~/.local/bin/orly version' - ``` - This provides the unified binary for split-mode deployments where a single binary can run any component via subcommands. + Note: setcap must be re-applied after each binary rebuild to allow binding to ports 80/443. + This is the recommended binary - just run `orly` for a complete monolithic relay, + or use subcommands (`orly db`, `orly acl`) for split-mode architecture. -13. **Report completion** with the new version and commit hash +12. **Report completion** with the new version and commit hash ## Important: - Do NOT push to github remote (only origin and gitea) diff --git a/cmd/orly/relay/relay.go b/cmd/orly/relay/relay.go index b63357c..2c1706f 100644 --- a/cmd/orly/relay/relay.go +++ b/cmd/orly/relay/relay.go @@ -51,17 +51,28 @@ Usage: Options: --help, -h Show this help message +MONOLITHIC MODE (default): + By default, the relay runs as a single self-contained binary with all + components embedded: + - Embedded Badger database (or Neo4j if configured) + - Embedded ACL engine (follows, managed, or curating modes) + - Embedded NIP-77 negentropy sync (when ORLY_NEGENTROPY_ENABLED=true) + + This is the simplest deployment - just run 'orly' and everything works. + The relay is the main Nostr server that: - Accepts WebSocket connections from clients - Processes EVENT, REQ, and other Nostr messages - - Stores events in the database (direct or via gRPC) - - Enforces ACL policies (direct or via gRPC) + - Stores events in the database (embedded or via gRPC) + - Enforces ACL policies (embedded or via gRPC) + - Handles NIP-77 negentropy set reconciliation (embedded or via gRPC) Environment variables: ORLY_PORT Server port (default: 3334) ORLY_LOG_LEVEL Logging level ORLY_DB_TYPE Database type: badger, neo4j, grpc (default: badger) ORLY_ACL_MODE ACL mode: none, follows, managed, curating (default: none) + ORLY_NEGENTROPY_ENABLED Enable NIP-77 negentropy sync (default: false) ORLY_TLS_DOMAINS Let's Encrypt domains ORLY_AUTH_TO_WRITE Require auth for writes @@ -78,9 +89,13 @@ gRPC Backend Configuration (for split-mode deployment): ORLY_GRPC_SYNC_CLUSTER Cluster sync address (default: 127.0.0.1:50054) Examples: - orly Start relay (monolithic mode) - orly relay Start relay (explicit) - ORLY_DB_TYPE=grpc orly Connect to gRPC database at 127.0.0.1:50051 - ORLY_ACL_TYPE=grpc orly Connect to gRPC ACL at 127.0.0.1:50052 + # Monolithic mode (all components embedded in single binary) + orly Start relay with embedded DB + ACL + ORLY_NEGENTROPY_ENABLED=true orly Enable NIP-77 negentropy sync + ORLY_ACL_MODE=follows orly Use follows-based whitelist ACL + + # Split mode (separate gRPC services) + ORLY_DB_TYPE=grpc orly Connect to gRPC database + ORLY_ACL_TYPE=grpc orly Connect to gRPC ACL ORLY_DB_TYPE=grpc ORLY_ACL_TYPE=grpc orly Full split mode`) } diff --git a/pkg/version/version b/pkg/version/version index 9ed446c..f21f2a1 100644 --- a/pkg/version/version +++ b/pkg/version/version @@ -1 +1 @@ -v0.57.1 +v0.57.2