Add the Home Assistant REST calendar client and the idempotent sync that writes important school events to Sam's Home Assistant calendar (FR-8). The school stays read-only; the only write is to the calendar (rule 7). - internal/calendar: HA REST client (states, create_event, get_events, delete_event) and the sync that selects important future events, adopts an existing event by its description marker, records the HA event id on the item, and records every attempt. - internal/store: migration 003 (items.ha_event_uid, items.ha_pushed_at and the append-only calendar_pushes table), candidates, mark-synced and the push log. - internal/parse: a school event is important; a routine class period is not. - cmd/school: `school calendar entities|status|push|events`. - web: an "Add to calendar" item action and a fail-loud calendar banner, so a failed write is never swallowed (FR-12). - scripts/calendar-push.sh, Makefile target, env example, docs and tests. The target is configurable (SCHOOL_HA_CALENDAR_ENTITY). Home Assistant has no non-Google writable calendar today, so the entity is asked on AUD-110. Co-Authored-By: Paperclip <noreply@paperclip.ing>
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
# Compass / NHS — its own image, own container, own port (8792).
|
|
# Deploy on .13: cd /home/sam/paseo/projects/compass_teams_nhs && docker compose up -d --build
|
|
#
|
|
# Secrets live in environment.d/school-service.env (gitignored), never here.
|
|
|
|
name: compass-teams-nhs
|
|
|
|
services:
|
|
school:
|
|
build:
|
|
context: .
|
|
args:
|
|
VERSION: "0.4.0-phase6"
|
|
image: compass-teams-nhs/school:0.4.0-phase6
|
|
container_name: compass-teams-nhs
|
|
restart: unless-stopped
|
|
env_file:
|
|
- environment.d/school-service.env
|
|
ports:
|
|
- "8792:8792"
|
|
volumes:
|
|
- compass-teams-nhs-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8792/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
# .13 has every default Docker address pool subnetted out (many projects),
|
|
# so this single-container service uses the host's default bridge and does
|
|
# not create a project network. The port is published above.
|
|
network_mode: bridge
|
|
|
|
volumes:
|
|
compass-teams-nhs-data:
|