diff options
Diffstat (limited to 'docs/reference/configuration.md')
| -rw-r--r-- | docs/reference/configuration.md | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index 52418ad..4692600 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md | |||
| @@ -574,6 +574,77 @@ NGIT_ARCHIVE_WHITELIST=npub1alice23...,npub1bob23.../linux,bitcoin-core | |||
| 574 | 574 | ||
| 575 | --- | 575 | --- |
| 576 | 576 | ||
| 577 | #### `NGIT_ARCHIVE_READ_ONLY` | ||
| 578 | |||
| 579 | **Description:** Configure relay as read-only sync of archived repositories | ||
| 580 | **Type:** Boolean | ||
| 581 | **Default:** `true` if `NGIT_ARCHIVE_ALL` or `NGIT_ARCHIVE_WHITELIST` is set, `false` otherwise | ||
| 582 | **Required:** No | ||
| 583 | |||
| 584 | **Examples:** | ||
| 585 | |||
| 586 | ```bash | ||
| 587 | # Explicitly enable (requires archive mode) | ||
| 588 | NGIT_ARCHIVE_READ_ONLY=true | ||
| 589 | |||
| 590 | # Explicitly disable (writable archive repos) | ||
| 591 | NGIT_ARCHIVE_READ_ONLY=false | ||
| 592 | |||
| 593 | # Automatic (default behavior) | ||
| 594 | # - If NGIT_ARCHIVE_ALL or NGIT_ARCHIVE_WHITELIST is set → true | ||
| 595 | # - Otherwise → false | ||
| 596 | # NGIT_ARCHIVE_READ_ONLY= | ||
| 597 | ``` | ||
| 598 | |||
| 599 | **Behavior:** | ||
| 600 | |||
| 601 | - When `true`: | ||
| 602 | - NIP-11 document includes `GRASP-05` in `supported_grasps` | ||
| 603 | - NIP-11 `curation` field describes the archive scope | ||
| 604 | - Repository announcements not listing this service are accepted per whitelist/archive-all | ||
| 605 | - When `false`: | ||
| 606 | - Archive mode disabled (standard GRASP-01 operation) | ||
| 607 | - When unset (default): | ||
| 608 | - Automatically `true` if archive mode configured | ||
| 609 | - Automatically `false` otherwise | ||
| 610 | |||
| 611 | **Error Conditions:** | ||
| 612 | |||
| 613 | ```bash | ||
| 614 | # ERROR: Cannot set read-only without archive config | ||
| 615 | NGIT_ARCHIVE_READ_ONLY=true | ||
| 616 | NGIT_ARCHIVE_ALL=false | ||
| 617 | NGIT_ARCHIVE_WHITELIST= | ||
| 618 | # → Server fails to start: "NGIT_ARCHIVE_READ_ONLY=true requires either | ||
| 619 | # NGIT_ARCHIVE_ALL=true or NGIT_ARCHIVE_WHITELIST to be set" | ||
| 620 | ``` | ||
| 621 | |||
| 622 | **NIP-11 Impact:** | ||
| 623 | |||
| 624 | When `NGIT_ARCHIVE_READ_ONLY=true`: | ||
| 625 | - `supported_grasps`: includes `"GRASP-05"` | ||
| 626 | - `curation`: Set to one of: | ||
| 627 | - `"Read-only sync of all repositories found on network"` (if `NGIT_ARCHIVE_ALL=true`) | ||
| 628 | - `"Read-only sync of whitelisted repositories and maintainers"` (if `NGIT_ARCHIVE_WHITELIST` set) | ||
| 629 | |||
| 630 | **Use Cases:** | ||
| 631 | |||
| 632 | ```bash | ||
| 633 | # Public archive of entire ecosystem | ||
| 634 | NGIT_ARCHIVE_ALL=true | ||
| 635 | NGIT_ARCHIVE_READ_ONLY=true # Default | ||
| 636 | |||
| 637 | # Selective backup of critical projects | ||
| 638 | NGIT_ARCHIVE_WHITELIST=npub1torvalds.../linux,npub1satoshi.../bitcoin | ||
| 639 | NGIT_ARCHIVE_READ_ONLY=true # Default | ||
| 640 | |||
| 641 | # Writable mirror (advanced, not typical) | ||
| 642 | NGIT_ARCHIVE_WHITELIST=npub1alice... | ||
| 643 | NGIT_ARCHIVE_READ_ONLY=false | ||
| 644 | ``` | ||
| 645 | |||
| 646 | --- | ||
| 647 | |||
| 577 | ### Logging Configuration | 648 | ### Logging Configuration |
| 578 | 649 | ||
| 579 | #### `RUST_LOG` | 650 | #### `RUST_LOG` |