Files
ngit-grasp/.env.example
T
DanConwayDev 2e799fa7ec feat: add database backend configuration options
Add environment variable configuration for database backend selection:
- Added DatabaseBackend enum (memory, nostrdb, lmdb) in src/config.rs
- Updated relay builder to use configured backend in src/nostr/builder.rs
- Added NGIT_DATABASE_BACKEND to .env.example with documentation
- Updated docs/reference/configuration.md with backend comparison table

NostrDB and LMDB backends prepared for future implementation when
nostr-relay-builder adds support. Currently defaults to in-memory
database with warning logs when persistent backends are selected.
2025-11-21 04:04:05 +00:00

35 lines
963 B
Bash

# ngit-grasp Configuration
# Domain where this instance is hosted (used in GRASP validation)
NGIT_DOMAIN=gitnostr.com
# Owner's npub (for relay info)
NGIT_OWNER_NPUB=npub1...
# Relay information (NIP-11)
NGIT_RELAY_NAME=My GRASP Relay
NGIT_RELAY_DESCRIPTION=A GRASP-compliant Git relay with Nostr authorization
# Storage paths
NGIT_GIT_DATA_PATH=./data/git
NGIT_RELAY_DATA_PATH=./data/relay
# Database backend (memory, nostrdb, lmdb)
# - memory: In-memory database (default, fastest, no persistence)
# - nostrdb: NostrDB backend (persistent, optimized for Nostr) [Not yet implemented]
# - lmdb: LMDB backend (persistent, general purpose) [Not yet implemented]
NGIT_DATABASE_BACKEND=memory
# Server configuration
NGIT_BIND_ADDRESS=127.0.0.1:8080
# Logging
RUST_LOG=info
# Optional: Proactive sync settings (GRASP-02)
# NGIT_PROACTIVE_SYNC_ENABLED=true
# NGIT_PROACTIVE_SYNC_INTERVAL_SECS=3600
# Optional: Archive mode (GRASP-05)
# NGIT_ARCHIVE_MODE=false