diff options
Diffstat (limited to 'docs/reference')
| -rw-r--r-- | docs/reference/configuration.md | 24 |
1 files changed, 12 insertions, 12 deletions
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 |