mirror of
https://github.com/cole-maxwell1/todo-hetzner.git
synced 2026-10-27 19:02:49 -05:00
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.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
.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
|
||||
Reference in New Issue
Block a user