|
|
||
|---|---|---|
| config | ||
| docker | ||
| templates | ||
| .dockerignore | ||
| .gitignore | ||
| CLAUDE.md | ||
| Dockerfile | ||
| GROK_CLIENT.md | ||
| MIGRATION_SUMMARY.md | ||
| README.md | ||
| config.py | ||
| config_cli.py | ||
| docker-compose.yml | ||
| grok_client.py | ||
| main.py | ||
| notification_client.py | ||
| ollama_client.py | ||
| quick_test.py | ||
| requirements.txt | ||
| scheduler.py | ||
| template_manager.py | ||
| test_connections.py | ||
| test_grok_client.py | ||
README.md
Dom
A notification scheduling system with Docker support.
Quick Start with Docker Compose
-
Build and start the service:
docker-compose up -d -
View logs:
docker-compose logs -f -
Stop the service:
docker-compose down
Migration from Ollama to Grok
If you're upgrading from an older version that used Ollama, you can migrate your configuration:
python3 migrate_to_grok.py
This will help you set up your OpenRouter API key and migrate your existing configuration.
Configuration
The configuration file is located in the config/ directory and is mapped as a volume, allowing you to modify it without rebuilding the container.
Modifying Configuration
- Edit
config/config.jsonon your host machine - The changes will be automatically picked up by the container
- Restart the container if needed:
docker-compose restart
Configuration Options
openrouter_api_key: OpenRouter API key for Grok-3 accessopenrouter_base_url: OpenRouter API base URLopenrouter_model: Model to use (default: x-ai/grok-3)openrouter_site_url: Your site URL for rankingsopenrouter_site_name: Your site name for rankingsollama_endpoint: Ollama API endpoint (legacy fallback)ollama_model: Model to use for text generation (legacy fallback)silent_start: Start time for silent period (HH:MM)silent_end: End time for silent period (HH:MM)timezone: Timezone for schedulingmin_interval: Minimum interval between notifications (minutes)max_interval: Maximum interval between notifications (minutes)bark_api_url: Bark notification service URLbark_device_key: Bark device keyntfy_api_url: Ntfy notification service URLntfy_topic: Ntfy topicntfy_access_token: Ntfy access tokentemplates_dir: Directory containing notification templates
Development
Local Development
python3 main.py
Building Docker Image
docker build -t dom .
Running with Docker
docker run -d \
--name dom \
-v $(pwd)/config:/app/config \
-v $(pwd)/templates:/app/templates \
dom
Volumes
./config:/app/config: Configuration directory (read-write)./templates:/app/templates: Templates directory (read-only)
Environment Variables
TZ: Timezone (default: Asia/Shanghai)
Push to private repo
docker build -t 192.168.2.212:3000/tigeren/dom:latest . docker push 192.168.2.212:3000/tigeren/dom:latest