mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
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.
35 lines
963 B
Bash
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
|