Full AlaMine deploy cycle: Terraform plan/apply, Ansible deploy, smoke test, error log reading. Knows server IPs, Makefile targets, 1Password vault, and required env vars. Use when user says 'задеплой', 'deploy', 'обнови сервер', 'выкати', 'apply infra', 'make apply', 'деплой DLE', 'обнови DNS', 'apply terraform', 'залей на сервер', 'dle-deploy', 'apply-robots'.
Full deploy cycle for AlaMine infrastructure. Runs from infrastructure/ directory.
| Target | Makefile command | Server |
|---|---|---|
| DLE site (full) | make apply-dle | 46.225.149.38 |
| DLE files only | make dle-deploy | 46.225.149.38 |
| DLE DB import | make dle-db-import DUMP=<path> | 46.225.149.38 |
| Robots (Pelican) | make apply-robots | 65.109.56.145 |
| DNS (Cloudflare) | make tf-cf-plan && make tf-cf-apply | - |
| Hetzner infra | make tf-hcloud-plan && make tf-hcloud-apply | - |
| Everything | make tf-apply-all && make apply |
| all |
Determine what needs to be deployed from user's message:
If unclear, ask the user.
cd /Users/evgeniystepanchuk/pet-projects/AlaMine/platform/infrastructure
# Verify 1Password CLI available
op account list 2>/dev/null && echo "1Password: OK" || echo "ERROR: op CLI not authenticated. Run: eval $(op signin)"
# Verify SSH key exists
ls -la ~/.ssh/alamine_deploy && echo "Deploy key: OK"
ls -la ~/.ssh/alamine_robots && echo "Robots key: OK"
# DNS changes
make tf-cf-plan
# Show plan output to user, wait for confirmation
make tf-cf-apply
# Hetzner Cloud changes
make tf-hcloud-plan
# Show plan output to user, wait for confirmation
make tf-hcloud-apply
Always show plan and wait for user confirmation before apply.
Required env vars on macOS (without these, deploy WILL fail):
SSH_AUTH_SOCK="" ANSIBLE_MODULE_STRICT_UTF8_RESPONSE=False make dle-deploy
Why:
SSH_AUTH_SOCK="" — prevents Too many authentication failures from ssh-agent with multiple keysANSIBLE_MODULE_STRICT_UTF8_RESPONSE=False — handles Cyrillic folder name in dle-site/SSH_AUTH_SOCK="" ANSIBLE_MODULE_STRICT_UTF8_RESPONSE=False make apply-dle
# If dump path has spaces, copy first:
cp "<path with spaces>" /tmp/dump.sql
SSH_AUTH_SOCK="" ANSIBLE_MODULE_STRICT_UTF8_RESPONSE=False make dle-db-import DUMP=/tmp/dump.sql
rm /tmp/dump.sql
make apply-robots
After deploy completes, verify the target is working:
# Main page
curl -sI https://alamine.day | head -5
# Should return HTTP/2 200
# Admin panel
curl -sI https://alamine.day/mine.php | head -5
# Should return HTTP/2 200 or 302 (redirect to login)
# Check a known static asset
curl -sI https://alamine.day/templates/Default/style/engine.css | head -5
# Should return 200
# Pelican panel
curl -sI https://panel.alamine.day | head -5
# Should return 200 or 302
# SSH connectivity
ssh -i ~/.ssh/alamine_robots [email protected] "docker ps --format 'table {{.Names}}\t{{.Status}}'" 2>/dev/null
dig +short alamine.day
# Should return 46.225.149.38
dig +short panel.alamine.day
# Should return 65.109.56.145
# DLE server logs
ssh -i ~/.ssh/alamine_deploy [email protected] "sudo tail -50 /var/log/nginx/error.log"
ssh -i ~/.ssh/alamine_deploy [email protected] "sudo tail -50 /var/log/php8.1-fpm.log"
ssh -i ~/.ssh/alamine_deploy [email protected] "sudo systemctl status nginx php8.1-fpm mariadb memcached"
# Robots server logs
ssh -i ~/.ssh/alamine_robots [email protected] "journalctl -u wings -n 50 --no-pager"
ssh -i ~/.ssh/alamine_robots [email protected] "docker ps -a"
Common issues:
chown -R www-data:www-data /var/www/dle## Deploy Report
**Target:** <what was deployed>
**Commands run:** <list of make targets>
**Duration:** <approximate>
### Smoke Test Results
| URL | Status | Expected |
|-----|--------|----------|
| https://alamine.day | 200 | 200 |
| https://alamine.day/mine.php | 302 | 200/302 |
### Issues Found
<none, or list of issues with fixes applied>
### Status: OK / NEEDS ATTENTION
SSH_AUTH_SOCK="" for DLE deploys on macOSmake tf-*-destroy without explicit user request