Configuration
This document details all configuration options available in ChronDB.
Configuration File
ChronDB uses an EDN (Extensible Data Notation) configuration file. By default, it looks for a config.edn file in the project's root directory.
Configuration Sections
1. Git (:git)
Git storage related configurations:
:git {
:committer-name "ChronDB" ; Name that will appear in commits
:committer-email "[email protected]" ; Email that will appear in commits
:default-branch "main" ; Main repository branch
:sign-commits false ; GPG commit signing
}Details
committer-name: Name used to identify the commit authorcommitter-email: Email used to identify the commit authordefault-branch: Name of the main branch where changes will be savedsign-commits: If true, commits will be signed with GPG (requires additional setup)
2. Storage (:storage)
Data storage related configurations:
Details
data-dir: Directory where documents will be storedDocuments are saved in JSON format
Directory structure is maintained by Git
Absolute paths are recommended in production
3. Logging (:logging)
Logging system configurations:
4. Servers (:servers)
Configuration for different protocols:
Complete Example
Loading Configuration
Best Practices
Development Environment:
Use
:debugas log levelSet
:outputto:stdoutUse relative paths for easier development
Production Environment:
Use
:infoor:warnas log levelSet
:outputto:fileUse absolute paths for directories
Configure external log rotation
Security:
Don't version control
config.ednwith credentialsUse environment variables for sensitive information
Restrict configuration file permissions
Last updated
Was this helpful?