diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-12 22:51:43 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-12 22:51:43 +0000 |
| commit | 51751d59f30a0c0f396afd1873ece9f4f77b44de (patch) | |
| tree | cfec6555427f1be38997e00f313549c41dfaa609 /docs | |
| parent | ab3337d0a3bf25c282f4d48e5d6150cf291f41e5 (diff) | |
Change default port from 8080 to 7334 (NGIT on phone keypad)
- Update default bind address in src/config.rs to 127.0.0.1:7334
- Update all four critical config sources per AGENTS.md:
- src/config.rs (code default and tests)
- .env.example (development template)
- docs/reference/configuration.md (user documentation)
- nix/module.nix (NixOS deployment)
- Update all documentation examples and references:
- README.md (with note about phone keypad mnemonic)
- docs/how-to/*.md (deploy, prometheus-setup, test-compliance)
- docs/explanation/*.md (architecture, comparison)
- docs/learnings/grasp-audit.md
Port 7334 spells NGIT on a phone keypad, making it memorable and
project-specific.
All tests pass (336 lib tests + 51 integration tests).
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/explanation/architecture.md | 2 | ||||
| -rw-r--r-- | docs/explanation/comparison.md | 2 | ||||
| -rw-r--r-- | docs/how-to/deploy.md | 2 | ||||
| -rw-r--r-- | docs/how-to/prometheus-setup.md | 6 | ||||
| -rw-r--r-- | docs/how-to/test-compliance.md | 4 | ||||
| -rw-r--r-- | docs/learnings/grasp-audit.md | 2 | ||||
| -rw-r--r-- | docs/reference/configuration.md | 24 |
7 files changed, 21 insertions, 21 deletions
diff --git a/docs/explanation/architecture.md b/docs/explanation/architecture.md index d2a9bf7..e101425 100644 --- a/docs/explanation/architecture.md +++ b/docs/explanation/architecture.md | |||
| @@ -580,7 +580,7 @@ RUN cargo build --release | |||
| 580 | FROM debian:bookworm-slim | 580 | FROM debian:bookworm-slim |
| 581 | RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | 581 | RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* |
| 582 | COPY --from=builder /app/target/release/ngit-grasp /usr/local/bin/ | 582 | COPY --from=builder /app/target/release/ngit-grasp /usr/local/bin/ |
| 583 | EXPOSE 8080 | 583 | EXPOSE 7334 |
| 584 | CMD ["ngit-grasp"] | 584 | CMD ["ngit-grasp"] |
| 585 | ``` | 585 | ``` |
| 586 | 586 | ||
diff --git a/docs/explanation/comparison.md b/docs/explanation/comparison.md index 72e49a7..090e0eb 100644 --- a/docs/explanation/comparison.md +++ b/docs/explanation/comparison.md | |||
| @@ -65,7 +65,7 @@ This document compares ngit-grasp (this project) with ngit-relay (the reference | |||
| 65 | ┌────────────── ngit-grasp (Single Binary) ─────────────┐ | 65 | ┌────────────── ngit-grasp (Single Binary) ─────────────┐ |
| 66 | │ │ | 66 | │ │ |
| 67 | │ ┌──────────────────────────────────────────────────┐ │ | 67 | │ ┌──────────────────────────────────────────────────┐ │ |
| 68 | │ │ hyper HTTP Server (:8080) │ │ | 68 | │ │ hyper HTTP Server (:7334) │ │ |
| 69 | │ │ - WebSocket upgrade for Nostr relay │ │ | 69 | │ │ - WebSocket upgrade for Nostr relay │ │ |
| 70 | │ │ - Git Smart HTTP handlers │ │ | 70 | │ │ - Git Smart HTTP handlers │ │ |
| 71 | │ │ - Landing page + metrics endpoint │ │ | 71 | │ │ - Landing page + metrics endpoint │ │ |
diff --git a/docs/how-to/deploy.md b/docs/how-to/deploy.md index 6fe8776..157e5f8 100644 --- a/docs/how-to/deploy.md +++ b/docs/how-to/deploy.md | |||
| @@ -229,7 +229,7 @@ git ls-remote https://ngit.example.com/<npub>/<repo>.git | |||
| 229 | 229 | ||
| 230 | ### Network | 230 | ### Network |
| 231 | - `bindAddress` - IP to bind to (default: "127.0.0.1") | 231 | - `bindAddress` - IP to bind to (default: "127.0.0.1") |
| 232 | - `port` - Port to listen on (default: 8080) | 232 | - `port` - Port to listen on (default: 7334) |
| 233 | 233 | ||
| 234 | ### Storage | 234 | ### Storage |
| 235 | - `dataDir` - Base directory for data (default: /var/lib/ngit-grasp-{name}) | 235 | - `dataDir` - Base directory for data (default: /var/lib/ngit-grasp-{name}) |
diff --git a/docs/how-to/prometheus-setup.md b/docs/how-to/prometheus-setup.md index 741255b..53ec480 100644 --- a/docs/how-to/prometheus-setup.md +++ b/docs/how-to/prometheus-setup.md | |||
| @@ -13,7 +13,7 @@ This guide shows how to configure Prometheus and Grafana to monitor ngit-grasp. | |||
| 13 | First, verify that ngit-grasp is exposing metrics: | 13 | First, verify that ngit-grasp is exposing metrics: |
| 14 | 14 | ||
| 15 | ```bash | 15 | ```bash |
| 16 | curl http://localhost:8080/metrics | 16 | curl http://localhost:7334/metrics |
| 17 | ``` | 17 | ``` |
| 18 | 18 | ||
| 19 | You should see Prometheus-formatted metrics like: | 19 | You should see Prometheus-formatted metrics like: |
| @@ -41,7 +41,7 @@ services.prometheus = { | |||
| 41 | { | 41 | { |
| 42 | job_name = "ngit-grasp"; | 42 | job_name = "ngit-grasp"; |
| 43 | static_configs = [{ | 43 | static_configs = [{ |
| 44 | targets = [ "localhost:8080" ]; # ngit-grasp bind address | 44 | targets = [ "localhost:7334" ]; # ngit-grasp bind address |
| 45 | }]; | 45 | }]; |
| 46 | scrape_interval = "15s"; | 46 | scrape_interval = "15s"; |
| 47 | metrics_path = "/metrics"; | 47 | metrics_path = "/metrics"; |
| @@ -105,7 +105,7 @@ global: | |||
| 105 | scrape_configs: | 105 | scrape_configs: |
| 106 | - job_name: 'ngit-grasp' | 106 | - job_name: 'ngit-grasp' |
| 107 | static_configs: | 107 | static_configs: |
| 108 | - targets: ['host.docker.internal:8080'] # or your ngit-grasp host | 108 | - targets: ['host.docker.internal:7334'] # or your ngit-grasp host |
| 109 | metrics_path: /metrics | 109 | metrics_path: /metrics |
| 110 | ``` | 110 | ``` |
| 111 | 111 | ||
diff --git a/docs/how-to/test-compliance.md b/docs/how-to/test-compliance.md index 370fb9a..8aa7ab1 100644 --- a/docs/how-to/test-compliance.md +++ b/docs/how-to/test-compliance.md | |||
| @@ -184,7 +184,7 @@ nix develop -c cargo run | |||
| 184 | 184 | ||
| 185 | # In another terminal, run audit tool | 185 | # In another terminal, run audit tool |
| 186 | cd grasp-audit | 186 | cd grasp-audit |
| 187 | nix develop -c cargo run -- --url ws://127.0.0.1:8080 | 187 | nix develop -c cargo run -- --url ws://127.0.0.1:7334 |
| 188 | ``` | 188 | ``` |
| 189 | 189 | ||
| 190 | ### For CI/CD | 190 | ### For CI/CD |
| @@ -424,7 +424,7 @@ nix develop -c cargo test --test nip01_compliance --test nip34_announcements | |||
| 424 | **For deep compliance check:** | 424 | **For deep compliance check:** |
| 425 | ```bash | 425 | ```bash |
| 426 | cd grasp-audit | 426 | cd grasp-audit |
| 427 | nix develop -c cargo run -- --url ws://127.0.0.1:8080 | 427 | nix develop -c cargo run -- --url ws://127.0.0.1:7334 |
| 428 | ``` | 428 | ``` |
| 429 | 429 | ||
| 430 | **Key points:** | 430 | **Key points:** |
diff --git a/docs/learnings/grasp-audit.md b/docs/learnings/grasp-audit.md index f4620d9..c7eff16 100644 --- a/docs/learnings/grasp-audit.md +++ b/docs/learnings/grasp-audit.md | |||
| @@ -110,7 +110,7 @@ use grasp_audit::client::AuditClient; | |||
| 110 | use grasp_audit::audit::AuditConfig; | 110 | use grasp_audit::audit::AuditConfig; |
| 111 | 111 | ||
| 112 | let config = AuditConfig::isolated(); | 112 | let config = AuditConfig::isolated(); |
| 113 | let client = AuditClient::new("ws://localhost:8080", config).await?; | 113 | let client = AuditClient::new("ws://localhost:7334", config).await?; |
| 114 | 114 | ||
| 115 | // Create and send an event - cleanup tags are added automatically | 115 | // Create and send an event - cleanup tags are added automatically |
| 116 | let event = client.event_builder() | 116 | let event = client.event_builder() |
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index 66f39f1..8b49297 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md | |||
| @@ -25,20 +25,20 @@ Configuration is loaded at startup and validated before the server starts. | |||
| 25 | 25 | ||
| 26 | **Description:** Address and port for the HTTP server to bind to | 26 | **Description:** Address and port for the HTTP server to bind to |
| 27 | **Type:** String (IP:PORT format) | 27 | **Type:** String (IP:PORT format) |
| 28 | **Default:** `127.0.0.1:8080` | 28 | **Default:** `127.0.0.1:7334` |
| 29 | **Required:** No | 29 | **Required:** No |
| 30 | 30 | ||
| 31 | **Examples:** | 31 | **Examples:** |
| 32 | 32 | ||
| 33 | ```bash | 33 | ```bash |
| 34 | # Localhost only (development) | 34 | # Localhost only (development) |
| 35 | NGIT_BIND_ADDRESS=127.0.0.1:8080 | 35 | NGIT_BIND_ADDRESS=127.0.0.1:7334 |
| 36 | 36 | ||
| 37 | # All interfaces (production) | 37 | # All interfaces (production) |
| 38 | NGIT_BIND_ADDRESS=0.0.0.0:8080 | 38 | NGIT_BIND_ADDRESS=0.0.0.0:7334 |
| 39 | 39 | ||
| 40 | # IPv6 | 40 | # IPv6 |
| 41 | NGIT_BIND_ADDRESS=[::1]:8080 | 41 | NGIT_BIND_ADDRESS=[::1]:7334 |
| 42 | 42 | ||
| 43 | # Custom port | 43 | # Custom port |
| 44 | NGIT_BIND_ADDRESS=127.0.0.1:3000 | 44 | NGIT_BIND_ADDRESS=127.0.0.1:3000 |
| @@ -64,7 +64,7 @@ NGIT_BIND_ADDRESS=127.0.0.1:3000 | |||
| 64 | ```bash | 64 | ```bash |
| 65 | NGIT_DOMAIN=gitnostr.com | 65 | NGIT_DOMAIN=gitnostr.com |
| 66 | NGIT_DOMAIN=git.example.org | 66 | NGIT_DOMAIN=git.example.org |
| 67 | NGIT_DOMAIN=localhost:8080 # Development only | 67 | NGIT_DOMAIN=localhost:7334 # Development only |
| 68 | ``` | 68 | ``` |
| 69 | 69 | ||
| 70 | **Used for:** | 70 | **Used for:** |
| @@ -77,7 +77,7 @@ NGIT_DOMAIN=localhost:8080 # Development only | |||
| 77 | **Notes:** | 77 | **Notes:** |
| 78 | 78 | ||
| 79 | - Must be accessible from the internet for production | 79 | - Must be accessible from the internet for production |
| 80 | - Include port if non-standard (e.g., `localhost:8080`) | 80 | - Include port if non-standard (e.g., `localhost:7334`) |
| 81 | - Used in repository clone URLs: `https://{NGIT_DOMAIN}/{npub}/{repo}.git` | 81 | - Used in repository clone URLs: `https://{NGIT_DOMAIN}/{npub}/{repo}.git` |
| 82 | 82 | ||
| 83 | --- | 83 | --- |
| @@ -1007,13 +1007,13 @@ For development, create a `.env` file in the project root: | |||
| 1007 | 1007 | ||
| 1008 | ```bash | 1008 | ```bash |
| 1009 | # .env file example | 1009 | # .env file example |
| 1010 | NGIT_DOMAIN=localhost:8080 | 1010 | NGIT_DOMAIN=localhost:7334 |
| 1011 | NGIT_OWNER_NPUB=npub1alice... | 1011 | NGIT_OWNER_NPUB=npub1alice... |
| 1012 | NGIT_RELAY_NAME="Development Relay" | 1012 | NGIT_RELAY_NAME="Development Relay" |
| 1013 | NGIT_RELAY_DESCRIPTION="Local development instance" | 1013 | NGIT_RELAY_DESCRIPTION="Local development instance" |
| 1014 | NGIT_GIT_DATA_PATH=./data/git | 1014 | NGIT_GIT_DATA_PATH=./data/git |
| 1015 | NGIT_RELAY_DATA_PATH=./data/relay | 1015 | NGIT_RELAY_DATA_PATH=./data/relay |
| 1016 | NGIT_BIND_ADDRESS=127.0.0.1:8080 | 1016 | NGIT_BIND_ADDRESS=127.0.0.1:7334 |
| 1017 | RUST_LOG=debug | 1017 | RUST_LOG=debug |
| 1018 | ``` | 1018 | ``` |
| 1019 | 1019 | ||
| @@ -1057,7 +1057,7 @@ NGIT_RELAY_NAME="GitNostr Public Relay" | |||
| 1057 | NGIT_RELAY_DESCRIPTION="Public GRASP relay for open source projects" | 1057 | NGIT_RELAY_DESCRIPTION="Public GRASP relay for open source projects" |
| 1058 | NGIT_GIT_DATA_PATH=/var/lib/ngit-grasp/git | 1058 | NGIT_GIT_DATA_PATH=/var/lib/ngit-grasp/git |
| 1059 | NGIT_RELAY_DATA_PATH=/var/lib/ngit-grasp/relay | 1059 | NGIT_RELAY_DATA_PATH=/var/lib/ngit-grasp/relay |
| 1060 | NGIT_BIND_ADDRESS=0.0.0.0:8080 | 1060 | NGIT_BIND_ADDRESS=0.0.0.0:7334 |
| 1061 | RUST_LOG=info,ngit_grasp=debug | 1061 | RUST_LOG=info,ngit_grasp=debug |
| 1062 | ``` | 1062 | ``` |
| 1063 | 1063 | ||
| @@ -1076,13 +1076,13 @@ RUST_LOG=info,ngit_grasp=debug | |||
| 1076 | 1076 | ||
| 1077 | ```bash | 1077 | ```bash |
| 1078 | # Development .env | 1078 | # Development .env |
| 1079 | NGIT_DOMAIN=localhost:8080 | 1079 | NGIT_DOMAIN=localhost:7334 |
| 1080 | NGIT_OWNER_NPUB=npub1test... | 1080 | NGIT_OWNER_NPUB=npub1test... |
| 1081 | NGIT_RELAY_NAME="Dev Relay" | 1081 | NGIT_RELAY_NAME="Dev Relay" |
| 1082 | NGIT_RELAY_DESCRIPTION="Local development" | 1082 | NGIT_RELAY_DESCRIPTION="Local development" |
| 1083 | NGIT_GIT_DATA_PATH=./data/git | 1083 | NGIT_GIT_DATA_PATH=./data/git |
| 1084 | NGIT_RELAY_DATA_PATH=./data/relay | 1084 | NGIT_RELAY_DATA_PATH=./data/relay |
| 1085 | NGIT_BIND_ADDRESS=127.0.0.1:8080 | 1085 | NGIT_BIND_ADDRESS=127.0.0.1:7334 |
| 1086 | RUST_LOG=debug | 1086 | RUST_LOG=debug |
| 1087 | ``` | 1087 | ``` |
| 1088 | 1088 | ||
| @@ -1124,7 +1124,7 @@ When multiple configuration sources exist: | |||
| 1124 | 1124 | ||
| 1125 | ```bash | 1125 | ```bash |
| 1126 | # .env file | 1126 | # .env file |
| 1127 | NGIT_BIND_ADDRESS=127.0.0.1:8080 | 1127 | NGIT_BIND_ADDRESS=127.0.0.1:7334 |
| 1128 | 1128 | ||
| 1129 | # Environment variable (overrides .env) | 1129 | # Environment variable (overrides .env) |
| 1130 | NGIT_BIND_ADDRESS=0.0.0.0:3000 cargo run | 1130 | NGIT_BIND_ADDRESS=0.0.0.0:3000 cargo run |