Update project configuration for Bookhoard organization rename
Phase 1 of Gitea repository migration: - Rename docker containers: bookmann_db → bookhoard_db, bookmann → bookhoard - Update database name: bookmann → bookhoard - Rename environment variables: BOOKMANN_* → BOOKHOARD_* - Update documentation references to new project name This prepares the codebase for migration to Bookhoard organization.
This commit is contained in:
+11
-11
@@ -21,14 +21,14 @@ Check media_item_formats table for existing KEPUB
|
||||
↓
|
||||
If KEPUB exists and is recent (< 24 hours):
|
||||
→ Serve pre-converted file
|
||||
→ Set X-Bookmann-KEPUB-SHA256 header
|
||||
→ Set X-Bookhoard-KEPUB-SHA256 header
|
||||
↓
|
||||
If KEPUB doesn't exist or is stale:
|
||||
→ Convert EPUB→KEPUB on-the-fly
|
||||
→ Calculate SHA-256 of converted KEPUB
|
||||
→ Store in media_item_formats (with converted_from_format_id)
|
||||
→ Serve converted file
|
||||
→ Set X-Bookmann-KEPUB-SHA256 header
|
||||
→ Set X-Bookhoard-KEPUB-SHA256 header
|
||||
↓
|
||||
Device downloads book with hash in response header
|
||||
↓
|
||||
@@ -43,9 +43,9 @@ Add these to your `.env` file or `system_config` table:
|
||||
|
||||
```bash
|
||||
# Conversion service configuration
|
||||
BOOKMANN_CONVERSION_CACHE_DIR=/var/bookmann/cache/kepub
|
||||
BOOKMANN_CONVERSION_TOOL=/usr/bin/kepubify # or /usr/bin/ebook-convert
|
||||
BOOKMANN_CONVERSION_CACHE_TTL=24h
|
||||
BOOKHOARD_CONVERSION_CACHE_DIR=/var/bookhoard/cache/kepub
|
||||
BOOKHOARD_CONVERSION_TOOL=/usr/bin/kepubify # or /usr/bin/ebook-convert
|
||||
BOOKHOARD_CONVERSION_CACHE_TTL=24h
|
||||
```
|
||||
|
||||
### Dockerfile Updates
|
||||
@@ -76,8 +76,8 @@ GET /opds/devices/{deviceId}/download/{bookId}?format=kepub
|
||||
**Response Headers:**
|
||||
- `Content-Type`: application/vnd.kobo+xml+zip
|
||||
- `Content-Disposition`: attachment; filename="book.kepub.epub"
|
||||
- `X-Bookmann-UUID`: uuid-123
|
||||
- `X-Bookmann-KEPUB-SHA256`: abc123... (KEPUB-specific hash)
|
||||
- `X-Bookhoard-UUID`: uuid-123
|
||||
- `X-Bookhoard-KEPUB-SHA256`: abc123... (KEPUB-specific hash)
|
||||
|
||||
## Database Schema
|
||||
|
||||
@@ -143,7 +143,7 @@ The service tries conversion tools in this order:
|
||||
### Cache Invalidation
|
||||
|
||||
Converted KEPUB files are cached for 24 hours by default. This TTL is configurable via:
|
||||
- Environment variable: `BOOKMANN_CONVERSION_CACHE_TTL`
|
||||
- Environment variable: `BOOKHOARD_CONVERSION_CACHE_TTL`
|
||||
- Code: `conversionCacheTTL` field in `ConversionService`
|
||||
|
||||
## Testing
|
||||
@@ -162,7 +162,7 @@ Use the provided Bruno test:
|
||||
This test verifies:
|
||||
- KEPUB hash header is present
|
||||
- Hash is 64 characters (SHA-256 format)
|
||||
- Bookmann UUID header is present
|
||||
- Bookhoard UUID header is present
|
||||
- Content-Type is correct for KEPUB
|
||||
|
||||
## Troubleshooting
|
||||
@@ -181,7 +181,7 @@ This test verifies:
|
||||
**Problem**: Converted files not being cached
|
||||
**Solution**:
|
||||
1. Verify cache directory exists and is writable
|
||||
2. Check `BOOKMANN_CONVERSION_CACHE_DIR` environment variable
|
||||
2. Check `BOOKHOARD_CONVERSION_CACHE_DIR` environment variable
|
||||
3. Ensure database can create media_item_formats records
|
||||
|
||||
### Hash Mismatches
|
||||
@@ -189,7 +189,7 @@ This test verifies:
|
||||
**Problem**: Progress sync fails after conversion
|
||||
**Solution**:
|
||||
1. Verify dual hash storage: both EPUB and KEPUB hashes should exist in `media_item_formats`
|
||||
2. Check `X-Bookmann-KEPUB-SHA256` header in response
|
||||
2. Check `X-Bookhoard-KEPUB-SHA256` header in response
|
||||
3. Ensure `converted_from_format_id` links KEPUB to source EPUB
|
||||
|
||||
## Performance Considerations
|
||||
|
||||
Reference in New Issue
Block a user