fix: database should not overwrite
This commit is contained in:
21
README.md
21
README.md
@@ -47,10 +47,31 @@ src/
|
||||
| `ELEVENLABS_API_KEY` | ElevenLabs API key for voiceover |
|
||||
| `ELEVENLABS_VOICE_ID` | Default ElevenLabs voice ID (optional) |
|
||||
| `ELEVENLABS_MODEL` | ElevenLabs model ID (default: `eleven_multilingual_v2`) |
|
||||
| `DATABASE_PATH` | SQLite file path (default: `./data/db.sqlite3`) |
|
||||
| `WEB_PORT` | Port for web dashboard (default: 3000) |
|
||||
| `WEB_BASE_URL` | Base URL for web dashboard |
|
||||
| `SESSION_SECRET` | Secret for session encryption |
|
||||
|
||||
## Data Persistence
|
||||
|
||||
- Bot options and other runtime state are stored in SQLite.
|
||||
- Keep `DATABASE_PATH` on persistent storage so updates/redeploys do not reset settings.
|
||||
- Backward compatibility: if `DATABASE_PATH` is unset and `src/database/db.sqlite3` exists, it is used automatically.
|
||||
- Recommended one-time migration:
|
||||
|
||||
```bash
|
||||
mkdir -p data && cp src/database/db.sqlite3 data/db.sqlite3
|
||||
```
|
||||
- Docker example:
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name joel-discord \
|
||||
-v joel_data:/data \
|
||||
--env-file .env \
|
||||
your-image:latest
|
||||
```
|
||||
|
||||
## Scripts
|
||||
|
||||
| Script | Description |
|
||||
|
||||
Reference in New Issue
Block a user