feat(deploy): aibook.fun deploy layer (terraform + ansible + docker on DO)

This commit is contained in:
dilonne
2026-09-02 10:57:09 +02:00
parent 89a3d76122
commit 8ef06cb3e7
21 changed files with 1106 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
# Deploy
Provisions a DO droplet + reserved IP + firewall + monitoring, builds the
Next.js image locally on the droplet, runs it behind Caddy.
## Deploy from scratch
```bash
cd terraform
infisical login
export INFISICAL_PROJECT_ID=<aibook-fun-project-id>
./itofu.sh init && ./itofu.sh plan && ./itofu.sh apply
./itofu.sh output -raw droplet_ip
# add Cloudflare A record: aibook.fun → <that-ip>
cd ..
ansible-playbook -i 'root@<that-ip>,' ansible/deploy.yml
```
## Structure
- `terraform/` — droplet + IP + firewall + monitoring
- `docker/` — Dockerfile + compose + Caddy
- `ansible/` — droplet convergence