Add activity tracker server, Hyprland agent and Gitea image publishing
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]>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
COMPOSE := docker compose -f deploy/docker-compose.yml
|
||||
DEV_DB := postgres://tracker:tracker@localhost:5432/tracker?sslmode=disable
|
||||
|
||||
.PHONY: build test test-integration run up down docker migrate install-agent
|
||||
|
||||
build:
|
||||
go build -o bin/ ./cmd/...
|
||||
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
# Runs the API tests against the compose Postgres (make up first).
|
||||
test-integration:
|
||||
TEST_DATABASE_URL='$(DEV_DB)' go test -count=1 ./...
|
||||
|
||||
run:
|
||||
DATABASE_URL='$(DEV_DB)' go run ./cmd/tracker serve
|
||||
|
||||
up:
|
||||
$(COMPOSE) up -d --build
|
||||
|
||||
down:
|
||||
$(COMPOSE) down
|
||||
|
||||
docker:
|
||||
docker build -f deploy/Dockerfile -t activity-tracker .
|
||||
|
||||
migrate:
|
||||
DATABASE_URL='$(DEV_DB)' go run ./cmd/tracker migrate
|
||||
|
||||
install-agent:
|
||||
go build -o $(HOME)/.local/bin/hypr-agent ./cmd/hypr-agent
|
||||
install -Dm644 deploy/systemd/hypr-agent.service $(HOME)/.config/systemd/user/hypr-agent.service
|
||||
systemctl --user daemon-reload
|
||||
Reference in New Issue
Block a user