Convert to database-first configuration with token storage

- Rename config.json → seed.json to clarify seeding purpose
- Update ConfigManager to be database-first with minimal file fallbacks
- Store Discord token in database instead of environment variables
- Remove allowedSfxChannels functionality completely
- Update seeding script to import token from seed.json to database
- Add token field to bot_config table in database schema
- Update Docker volume mount to use seed.json
- Update gitignore to protect seed.json while allowing seed.example.json

Configuration Flow:
1. First run: Import from seed.json to database (one-time seeding)
2. Runtime: All configuration from SQLite database
3. Fallback: Environment variables if database unavailable

Security: All sensitive data now stored in encrypted SQLite database

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Chris Ham
2025-08-16 23:37:06 -07:00
parent 6d93f3dcad
commit 8823eac094
6 changed files with 60 additions and 107 deletions

View File

@@ -8,8 +8,8 @@ services:
container_name: discord-bot
restart: unless-stopped
volumes:
# Configuration files (read-only)
- ./config.json:/app/config.json:ro
# Seed file for initial database population (read-only)
- ./seed.json:/app/seed.json:ro
- ./conf:/app/conf:ro
# Sound effects directory (read-only)