Files
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

40 lines
1.1 KiB
Makefile

.PHONY: build-app test vet format css infra-init infra-plan infra-validate generate-inventory ansible-syntax deploy-ansible validate
build-app:
$(MAKE) -C app build
test:
cd app && go test ./...
vet:
cd app && go vet ./...
format:
cd app && gofmt -w $$(find . -name '*.go' -not -path './bin/*')
tofu -chdir=infra fmt -recursive
css:
$(MAKE) -C app css
infra-init:
tofu -chdir=infra init -backend=false
infra-plan:
tofu -chdir=infra plan -var-file=environments/prod/prod.tfvars -var-file=environments/staging/staging.tfvars
infra-validate: infra-init
tofu -chdir=infra validate
generate-inventory:
tofu -chdir=infra output -raw ansible_inventory > ansible/inventory/hosts.yml
ansible-syntax:
cd ansible && ansible-playbook -i inventory/hosts.example.yml playbooks/setup-node.yml --syntax-check
cd ansible && ansible-playbook -i inventory/hosts.example.yml playbooks/deploy-app.yml --syntax-check
deploy-ansible: generate-inventory
cd ansible && ansible-playbook -i inventory/hosts.yml playbooks/setup-node.yml
cd ansible && ansible-playbook -i inventory/hosts.yml playbooks/deploy-app.yml
validate: test vet infra-validate ansible-syntax