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:
@@ -23,7 +23,7 @@ Created a complete EPUB→KEPUB conversion service with:
|
||||
Updated the OPDS handler to integrate with conversion service:
|
||||
- Modified `NewOPDSHandler` to accept conversion service dependency
|
||||
- Enhanced `DownloadBook` method to support on-the-fly KEPUB conversion
|
||||
- Updated response headers to include `X-Bookmann-KEPUB-SHA256` for KEPUB downloads
|
||||
- Updated response headers to include `X-Bookhoard-KEPUB-SHA256` for KEPUB downloads
|
||||
- Properly handles format-specific hash headers
|
||||
|
||||
**Behavior**:
|
||||
@@ -62,7 +62,7 @@ Created comprehensive unit tests:
|
||||
|
||||
Created Bruno API test that validates:
|
||||
- KEPUB hash header presence and format
|
||||
- Bookmann UUID header
|
||||
- Bookhoard UUID header
|
||||
- Correct Content-Type for KEPUB format
|
||||
|
||||
### 5. Documentation ✅
|
||||
@@ -82,9 +82,9 @@ Comprehensive documentation covering:
|
||||
|
||||
**File**: `.env.example`
|
||||
Added conversion service configuration variables:
|
||||
- `BOOKMANN_CONVERSION_CACHE_DIR` - Cache directory path
|
||||
- `BOOKMANN_CONVERSION_TOOL` - Conversion tool to use
|
||||
- `BOOKMANN_CONVERSION_CACHE_TTL` - Cache time-to-live
|
||||
- `BOOKHOARD_CONVERSION_CACHE_DIR` - Cache directory path
|
||||
- `BOOKHOARD_CONVERSION_TOOL` - Conversion tool to use
|
||||
- `BOOKHOARD_CONVERSION_CACHE_TTL` - Cache time-to-live
|
||||
|
||||
**File**: `Dockerfile`
|
||||
Added kepubify installation in final stage:
|
||||
@@ -135,7 +135,7 @@ Check media_item_formats for existing KEPUB
|
||||
│
|
||||
└─ Serve cached file
|
||||
↓
|
||||
Set X-Bookmann-KEPUB-SHA256 header
|
||||
Set X-Bookhoard-KEPUB-SHA256 header
|
||||
↓
|
||||
Stream file to client
|
||||
```
|
||||
@@ -172,11 +172,11 @@ go build -o /tmp/bookmann-test ./cmd/server
|
||||
4. Request KEPUB download via OPDS:
|
||||
```bash
|
||||
curl "http://localhost:8765/opds/devices/{deviceId}/download/{bookId}?format=kepub" \
|
||||
-I | grep -i "X-Bookmann-KEPUB-SHA256"
|
||||
-I | grep -i "X-Bookhoard-KEPUB-SHA256"
|
||||
```
|
||||
5. Verify response headers:
|
||||
- `X-Bookmann-KEPUB-SHA256` present (64-character hash)
|
||||
- `X-Bookmann-UUID` present
|
||||
- `X-Bookhoard-KEPUB-SHA256` present (64-character hash)
|
||||
- `X-Bookhoard-UUID` present
|
||||
- `Content-Type: application/vnd.kobo+xml+zip`
|
||||
|
||||
### Automated Testing
|
||||
@@ -236,8 +236,8 @@ The conversion service is designed to support:
|
||||
|
||||
Before deploying to production:
|
||||
- [ ] Verify kepubify is installed in container
|
||||
- [ ] Set `BOOKMANN_CONVERSION_CACHE_DIR` to persistent volume
|
||||
- [ ] Configure `BOOKMANN_CONVERSION_CACHE_TTL` appropriately
|
||||
- [ ] Set `BOOKHOARD_CONVERSION_CACHE_DIR` to persistent volume
|
||||
- [ ] Configure `BOOKHOARD_CONVERSION_CACHE_TTL` appropriately
|
||||
- [ ] Test conversion with actual EPUB files
|
||||
- [ ] Monitor cache directory size and set up cleanup
|
||||
- [ ] Verify database has `media_item_formats` table
|
||||
@@ -248,7 +248,7 @@ Before deploying to production:
|
||||
## Rollback Plan
|
||||
|
||||
If issues arise:
|
||||
1. Set `BOOKMANN_CONVERSION_TOOL=""` to disable conversion
|
||||
1. Set `BOOKHOARD_CONVERSION_TOOL=""` to disable conversion
|
||||
2. Remove `conversionService` parameter from `NewOPDSHandler`
|
||||
3. OPDS handler will fall back to serving EPUB only
|
||||
4. No database schema changes required (schema already existed)
|
||||
|
||||
Reference in New Issue
Block a user