upleb.uk

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

summaryrefslogtreecommitdiff
path: root/.env.example
blob: 9207dc4c26d4889a89bce32cf146e979537805d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# ngit-grasp Configuration
#
# Configuration Priority (highest to lowest):
# 1. CLI flags (e.g., --domain example.com)
# 2. Environment variables (e.g., NGIT_DOMAIN=example.com)  
# 3. This .env file
# 4. Built-in defaults
#
# Run `ngit-grasp --help` for all CLI options

# ============================================================================
# REQUIRED
# ============================================================================

# Domain where this instance is hosted (required, used in GRASP validation)
# CLI: --domain <domain>
# No default - must be set
# NGIT_DOMAIN=

# ============================================================================
# SERVER CONFIGURATION
# ============================================================================

# Server bind address (IP:PORT)
# CLI: --bind-address <address>
# Default: 127.0.0.1:8080
# NGIT_BIND_ADDRESS=127.0.0.1:8080

# ============================================================================
# RELAY INFORMATION (NIP-11)
# ============================================================================

# Owner's npub (optional, for relay info in NIP-11)
# CLI: --owner-npub <npub>
# Default: (none)
# NGIT_OWNER_NPUB=npub1...

# Relay name shown in NIP-11 information document
# CLI: --relay-name <name>
# Default: ${domain} grasp relay (e.g., "gitnostr.com grasp relay")
# NGIT_RELAY_NAME=My GRASP Relay

# Relay description shown in NIP-11 information document
# CLI: --relay-description <description>
# Default: Git Nostr Relay - a grasp implementation
# NGIT_RELAY_DESCRIPTION="A GRASP-compliant Git relay with Nostr authorization"

# ============================================================================
# STORAGE
# ============================================================================

# Path to store Git repositories
# CLI: --git-data-path <path>
# Default: ./data/git
# NGIT_GIT_DATA_PATH=./data/git

# Path to store Nostr relay data
# CLI: --relay-data-path <path>
# Default: ./data/relay
# NGIT_RELAY_DATA_PATH=./data/relay

# Database backend for Nostr events
# CLI: --database-backend <backend>
# Options: lmdb, memory, nostrdb
# Default: lmdb
#   - lmdb: LMDB backend (persistent, general purpose) - RECOMMENDED
#   - memory: In-memory database (fastest, no persistence, uses temp dirs)
#   - nostrdb: NostrDB backend (persistent, Nostr-optimized) [Not yet implemented]
#
# Note: When using 'memory' backend, git_data_path and relay_data_path
# are automatically set to temporary directories for ephemeral testing.
# NGIT_DATABASE_BACKEND=lmdb

# ============================================================================
# METRICS
# ============================================================================

# Enable Prometheus metrics endpoint at /metrics
# CLI: --metrics-enabled
# Default: true
# NGIT_METRICS_ENABLED=true

# Connections per IP before flagging as potential abuse in metrics
# (display only, no rate limiting - purely for monitoring visibility)
# CLI: --metrics-connection-per-ip-abuse-threshold <count>
# Default: 10
# NGIT_METRICS_CONNECTION_PER_IP_ABUSE_THRESHOLD=10

# Number of top bandwidth repositories to track in metrics
# CLI: --metrics-top-n-repos <count>
# Default: 10
# NGIT_METRICS_TOP_N_REPOS=10

# ============================================================================
# LOGGING
# ============================================================================

# Rust log level (not a ngit-grasp config, but useful for debugging)
# Options: error, warn, info, debug, trace
# RUST_LOG=info

# ============================================================================
# FUTURE/PLANNED OPTIONS (not yet implemented)
# ============================================================================

# Proactive sync settings (GRASP-02)
# NGIT_PROACTIVE_SYNC_ENABLED=true
# NGIT_PROACTIVE_SYNC_INTERVAL_SECS=3600

# Archive mode (GRASP-05)
# NGIT_ARCHIVE_MODE=false