Files
todo-hetzner/app/Makefile
T
cole-maxwell1 1382c42803 feat: add Hetzner-hosted todo application stack
Implement the server-rendered Go todo application with PostgreSQL persistence, Tailwind styling, health checks, and test coverage.

Provision production and staging infrastructure with OpenTofu, including private networking, static IPs, Object Storage backups, and load balancing.

Configure Rocky Linux hosts with Ansible, rootless Podman, PostgreSQL, WAL-G backup automation, staging restores, and generated inventory.
2026-08-06 21:34:56 -05:00

28 lines
788 B
Makefile

TAILWIND_VERSION ?= v3.4.17
TAILWIND_BIN := ./tailwindcss
.PHONY: build css test vet clean
build: css
mkdir -p bin
CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o bin/todo ./cmd/server
$(TAILWIND_BIN):
@os=$$(uname -s | tr '[:upper:]' '[:lower:]'); arch=$$(uname -m); \
case "$$os" in darwin) os=macos ;; linux) ;; *) exit 1 ;; esac; \
case "$$arch" in x86_64) arch=x64 ;; arm64|aarch64) arch=arm64 ;; *) exit 1 ;; esac; \
curl -fsSL -o $(TAILWIND_BIN) "https://github.com/tailwindlabs/tailwindcss/releases/download/$(TAILWIND_VERSION)/tailwindcss-$$os-$$arch"
chmod +x $(TAILWIND_BIN)
css: $(TAILWIND_BIN)
$(TAILWIND_BIN) -c tailwind.config.js -i web/input.css -o web/static/app.css --minify
test:
go test ./...
vet:
go vet ./...
clean:
rm -rf bin $(TAILWIND_BIN)