feat(deploy): aibook.fun deploy layer (terraform + ansible + docker on DO)
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user