upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/.env.example
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-03 11:17:39 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-03 11:19:20 +0000
commit57bc8cd9c021feaf08e139e8fb62800bc476068e (patch)
treec62abdffb4c91999cae2f570597b9ac154c2e51d /.env.example
parent2f8ecd482077d82f2d1a937c7f979eaaa87a27b2 (diff)
improved settings cli flags > env vars > defaults
Diffstat (limited to '.env.example')
-rw-r--r--.env.example101
1 files changed, 79 insertions, 22 deletions
diff --git a/.env.example b/.env.example
index 796415e..0a93b1f 100644
--- a/.env.example
+++ b/.env.example
@@ -1,34 +1,91 @@
1# ngit-grasp Configuration 1# ngit-grasp Configuration
2#
3# Configuration Priority (highest to lowest):
4# 1. CLI flags (e.g., --domain example.com)
5# 2. Environment variables (e.g., NGIT_DOMAIN=example.com)
6# 3. This .env file
7# 4. Built-in defaults
8#
9# Run `ngit-grasp --help` for all CLI options
2 10
3# Domain where this instance is hosted (used in GRASP validation) 11# ============================================================================
4NGIT_DOMAIN=gitnostr.com 12# REQUIRED
13# ============================================================================
5 14
6# Owner's npub (for relay info) 15# Domain where this instance is hosted (required, used in GRASP validation)
7NGIT_OWNER_NPUB=npub1... 16# CLI: --domain <domain>
17# No default - must be set
18# NGIT_DOMAIN=
8 19
9# Relay information (NIP-11) 20# ============================================================================
10NGIT_RELAY_NAME=My GRASP Relay 21# SERVER CONFIGURATION
11NGIT_RELAY_DESCRIPTION=A GRASP-compliant Git relay with Nostr authorization 22# ============================================================================
12 23
13# Storage paths 24# Server bind address (IP:PORT)
14NGIT_GIT_DATA_PATH=./data/git 25# CLI: --bind-address <address>
15NGIT_RELAY_DATA_PATH=./data/relay 26# Default: 127.0.0.1:8080
27# NGIT_BIND_ADDRESS=127.0.0.1:8080
16 28
17# Database backend (memory, nostrdb, lmdb) 29# ============================================================================
18# - memory: In-memory database (default, fastest, no persistence) 30# RELAY INFORMATION (NIP-11)
19# - nostrdb: NostrDB backend (persistent, optimized for Nostr) [Not yet implemented] 31# ============================================================================
20# - lmdb: LMDB backend (persistent, general purpose)
21NGIT_DATABASE_BACKEND=memory
22 32
23# Server configuration 33# Owner's npub (optional, for relay info in NIP-11)
24NGIT_BIND_ADDRESS=127.0.0.1:8080 34# CLI: --owner-npub <npub>
35# Default: (none)
36# NGIT_OWNER_NPUB=npub1...
25 37
26# Logging 38# Relay name shown in NIP-11 information document
27RUST_LOG=info 39# CLI: --relay-name <name>
40# Default: ${domain} grasp relay (e.g., "gitnostr.com grasp relay")
41# NGIT_RELAY_NAME=My GRASP Relay
28 42
29# Optional: Proactive sync settings (GRASP-02) 43# Relay description shown in NIP-11 information document
44# CLI: --relay-description <description>
45# Default: Git Nostr Relay - a grasp implementation
46# NGIT_RELAY_DESCRIPTION="A GRASP-compliant Git relay with Nostr authorization"
47
48# ============================================================================
49# STORAGE
50# ============================================================================
51
52# Path to store Git repositories
53# CLI: --git-data-path <path>
54# Default: ./data/git
55# NGIT_GIT_DATA_PATH=./data/git
56
57# Path to store Nostr relay data
58# CLI: --relay-data-path <path>
59# Default: ./data/relay
60# NGIT_RELAY_DATA_PATH=./data/relay
61
62# Database backend for Nostr events
63# CLI: --database-backend <backend>
64# Options: lmdb, memory, nostrdb
65# Default: lmdb
66# - lmdb: LMDB backend (persistent, general purpose) - RECOMMENDED
67# - memory: In-memory database (fastest, no persistence, uses temp dirs)
68# - nostrdb: NostrDB backend (persistent, Nostr-optimized) [Not yet implemented]
69#
70# Note: When using 'memory' backend, git_data_path and relay_data_path
71# are automatically set to temporary directories for ephemeral testing.
72# NGIT_DATABASE_BACKEND=lmdb
73
74# ============================================================================
75# LOGGING
76# ============================================================================
77
78# Rust log level (not a ngit-grasp config, but useful for debugging)
79# Options: error, warn, info, debug, trace
80# RUST_LOG=info
81
82# ============================================================================
83# FUTURE/PLANNED OPTIONS (not yet implemented)
84# ============================================================================
85
86# Proactive sync settings (GRASP-02)
30# NGIT_PROACTIVE_SYNC_ENABLED=true 87# NGIT_PROACTIVE_SYNC_ENABLED=true
31# NGIT_PROACTIVE_SYNC_INTERVAL_SECS=3600 88# NGIT_PROACTIVE_SYNC_INTERVAL_SECS=3600
32 89
33# Optional: Archive mode (GRASP-05) 90# Archive mode (GRASP-05)
34# NGIT_ARCHIVE_MODE=false 91# NGIT_ARCHIVE_MODE=false \ No newline at end of file