Files
workhive-caldav-sync/README.md
LockeShor a519e46482
All checks were successful
Docker Image / build (push) Successful in 2m29s
work yay
2026-06-08 22:34:54 -04:00

1.2 KiB

workhive-caldav-sync

Sync Workhive schedule shifts to a CalDAV calendar.

Basic usage

  1. Copy .env.example to .env and fill values (do NOT commit .env).

  2. Run locally with Docker Compose (recommended):

# build and run
docker compose up --build

# or run in background
docker compose up --build -d

# stop
docker compose down
  1. Or run with Docker directly:
docker build -t workhive-sync:latest .
docker run --rm --env-file .env workhive-sync:latest

Notes

  • Secrets are read from environment via python-dotenv when running locally (.env file).
  • The script expects the website to provide times in the timezone set by TIMEZONE (default America/New_York).
  • Events are checked for duplicates by deterministic UID and summary+start match before creation.

Container behavior

  • The container runs sync.py once immediately and then repeats every hour.
  • If you prefer a one-shot run (no loop), change the CMD in the Dockerfile to python sync.py or run the image with an override command.

Files of interest: