.PHONY: help test test-integration test-all rebuild-app rebuild-app-force rebuild rebuild-force rebuild-force-db clean restart up down logs ps test-env-up test-env-down release # Include .env file for environment variables (single source of truth) # Ignore if .env doesn't exist yet ifneq (,$(wildcard ./.env)) include .env export endif # Auto-detect container runtime: prefer docker, fall back to podman # Override with: CONTAINER_RUNTIME=podman make rebuild-app CONTAINER_RUNTIME ?= $(shell command -v docker 2>/dev/null || command -v podman 2>/dev/null) # Dev compose stack: base prod file merged with the dev override (local build + tests). # Prod deploy does NOT use this — it runs plain `docker compose` against the base file only. COMPOSE := $(CONTAINER_RUNTIME) compose -f docker-compose.yml -f docker-compose.dev.yml # Default target help: @echo "Available targets:" @echo "" @echo "Development:" @echo " make up - Start containers (if already built)" @echo " make rebuild - Rebuild all containers (database preserved)" @echo " make rebuild-force - Rebuild all containers, no cache (database preserved)" @echo " make rebuild-app - Rebuild app container only (fast, database preserved)" @echo " make rebuild-app-force - Rebuild app container only, no cache (database preserved)" @echo " make rebuild-force-db - Rebuild all containers, no cache (DELETES database)" @echo " make restart - Restart app container (preserves db)" @echo " make down - Stop all containers (preserves volumes)" @echo " make clean - Stop and remove all containers and volumes" @echo "" @echo "Status & Logs:" @echo " make ps - Show container status" @echo " make logs - Show container logs (follow mode)" @echo "" @echo "Testing:" @echo " make test - Run unit tests (from host, fast)" @echo " make test-integration - Run integration tests (in containers, matches prod)" @echo " make test-all - Run all tests (unit + integration)" @echo " make test-env-up - Start containers with test mode enabled" @echo " make test-env-down - Stop test environment" @echo "" @echo "Verification:" @echo "" @echo "Release:" @echo " ./release v0.3.0 - Tag, push, and release (notes auto-generated from commits)" # Run unit tests locally (fast, no containers) test: lint-rendering go test ./internal/... -v -short # Rendering-ownership guard (AGENTS.md → Rendering ownership): templ renders # UI markup, JS orchestrates. Fails when a web/src file builds more HTML # template literals than its recorded baseline (web/src/rendering-allowlist.txt), # or when a .templ file gains an inline