This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tangled-infra / justfile
2.0 kB 72 lines
1# tangled-infra — knot + spindle on hetzner 2# usage: just <recipe> 3 4set dotenv-load := true 5 6# show available recipes 7default: 8 @just --list 9 10# terraform plan 11plan: 12 cd infra && terraform plan 13 14# terraform apply — STANDS UP A REAL HETZNER BOX (real €/mo) 15apply: 16 cd infra && terraform apply 17 18# terraform destroy — TEARS DOWN THE HETZNER BOX 19destroy: 20 cd infra && terraform destroy 21 22# initial terraform setup (run once) 23init: 24 cd infra && terraform init 25 26# show outputs (server IP, DNS records needed, etc.) 27outputs: 28 cd infra && terraform output 29 30# get server IP for ad-hoc commands 31ip: 32 @cd infra && terraform output -raw server_ip 33 34# ssh to the box as root 35ssh: 36 ssh root@$(just ip) 37 38# tail the bootstrap log 39bootstrap-log: 40 ssh root@$(just ip) "tail -f /var/log/tangled-bootstrap.log" 41 42# tail knot logs 43knot-logs: 44 ssh root@$(just ip) "journalctl -xeu knot.service -f" 45 46# tail spindle logs 47spindle-logs: 48 ssh root@$(just ip) "journalctl -xeu spindle.service -f" 49 50# tail caddy logs 51caddy-logs: 52 ssh root@$(just ip) "journalctl -xeu caddy.service -f" 53 54# check all service health 55status: 56 @ssh root@$(just ip) "systemctl status knot spindle caddy docker --no-pager -l" 57 58# re-deploy bootstrap.sh + service files + Caddyfile to an existing box (no terraform re-apply) 59redeploy: 60 scp deploy/bootstrap.sh deploy/knot.service deploy/spindle.service deploy/Caddyfile root@$(just ip):/opt/tangled-infra/ 61 @echo "files copied. ssh in and re-run /opt/tangled-infra/bootstrap.sh if you want a full re-provision," 62 @echo "or restart specific services with: just restart-{knot,spindle,caddy}" 63 64restart-knot: 65 ssh root@$(just ip) "systemctl restart knot.service && systemctl status knot.service --no-pager -l" 66 67restart-spindle: 68 ssh root@$(just ip) "systemctl restart spindle.service && systemctl status spindle.service --no-pager -l" 69 70restart-caddy: 71 ssh root@$(just ip) "systemctl reload caddy.service && systemctl status caddy.service --no-pager -l" 72