# Baïkal Calendar Sync A Dockerized Python service that periodically synchronizes an external Outlook ICS calendar to a local Baïkal CalDAV server. ## Features - **Automatic Sync**: Runs periodically (default: every 5 minutes). - **Environment Configurable**: All credentials and URLs are set via environment variables. - **Docker Ready**: Includes `Dockerfile` and `docker-compose.yml` for easy deployment. ## Prerequisites - Docker & Docker Compose installed. - An existing Baïkal instance. - An Outlook ICS link. ## Configuration (Environment Variables) | Variable | Description | Default | | :--- | :--- | :--- | | `ICS_URL` | The public ICS URL of your Outlook calendar. | **Required** | | `BAIKAL_URL` | The URL to your Baïkal calendar (e.g., `http://baikal/dav.php/calendars/user/id/`). | **Required** | | `BAIKAL_USER` | Your Baïkal username. | **Required** | | `BAIKAL_PASS` | Your Baïkal password. | **Required** | | `SYNC_FREQUENCY` | How often to sync **in minutes**. | `5` | ## Quick Start with Docker Compose 1. **Clone or download** this repository. 2. **Create a `.env` file** (optional but recommended) or export variables: ```bash ICS_URL="https://outlook.office365.com/..." BAIKAL_URL="http://localhost:8080/dav.php/calendars/Lago/default/" BAIKAL_USER="Lago" BAIKAL_PASS="secret" SYNC_FREQUENCY=5 ``` 3. **Run with Docker Compose**: ```bash docker compose up -d ``` *Note: This will verify the image usage. If you need to rebuild locally, run `docker compose up -d --build`.* 4. **Check Logs**: ```bash docker compose logs -f baikal-sync ``` ## Building & Publishing the Image 1. **Build**: ```bash docker build -t lagortinez/baikal-sync:latest . ``` 2. **Push** (requires `docker login`): ```bash docker push lagortinez/baikal-sync:latest ```