# Dom A notification scheduling system with Docker support. ## Quick Start with Docker Compose 1. **Build and start the service:** ```bash docker-compose up -d ``` 2. **View logs:** ```bash docker-compose logs -f ``` 3. **Stop the service:** ```bash docker-compose down ``` ## Migration from Ollama to Grok If you're upgrading from an older version that used Ollama, you can migrate your configuration: ```bash 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 1. Edit `config/config.json` on your host machine 2. The changes will be automatically picked up by the container 3. Restart the container if needed: `docker-compose restart` ### Configuration Options - `openrouter_api_key`: OpenRouter API key for Grok-3 access - `openrouter_base_url`: OpenRouter API base URL - `openrouter_model`: Model to use (default: x-ai/grok-3) - `openrouter_site_url`: Your site URL for rankings - `openrouter_site_name`: Your site name for rankings - `ollama_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 scheduling - `min_interval`: Minimum interval between notifications (minutes) - `max_interval`: Maximum interval between notifications (minutes) - `bark_api_url`: Bark notification service URL - `bark_device_key`: Bark device key - `ntfy_api_url`: Ntfy notification service URL - `ntfy_topic`: Ntfy topic - `ntfy_access_token`: Ntfy access token - `templates_dir`: Directory containing notification templates ## Development ### Local Development ```bash python3 main.py ``` ### Building Docker Image ```bash docker build -t dom . ``` ### Running with Docker ```bash 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