The Go API on PostgreSQL ingests desktop, browser, presence, manual and Health Auto Export events and serves activities and daily goal summaries. The Hyprland agent records window focus, idle and lock intervals. The CI workflow publishes adam-french.co.uk/adamf/activity-tracker to the Gitea registry and rolls the web_server stack onto it. The image probes itself through a new `tracker healthcheck` command, because distroless has no wget. Co-Authored-By: Claude Opus 5.5 <[email protected]>
36 lines
857 B
YAML
36 lines
857 B
YAML
# Local development stack. In production, run only the `tracker` service and
|
|
# point DATABASE_URL at your external PostgreSQL.
|
|
services:
|
|
tracker:
|
|
image: activity-tracker
|
|
build:
|
|
context: ..
|
|
dockerfile: deploy/Dockerfile
|
|
environment:
|
|
DATABASE_URL: postgres://tracker:tracker@postgres:5432/tracker?sslmode=disable
|
|
TRACKER_TZ: ${TRACKER_TZ:-UTC}
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
postgres:
|
|
image: postgres:17
|
|
environment:
|
|
POSTGRES_USER: tracker
|
|
POSTGRES_PASSWORD: tracker
|
|
POSTGRES_DB: tracker
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U tracker"]
|
|
interval: 2s
|
|
retries: 15
|
|
|
|
volumes:
|
|
pgdata:
|