AWS EC2 Deployment¶
Deploy Django Keel projects to AWS EC2 with Ansible.
Prerequisites¶
- AWS account with EC2 access
- Ansible installed
- SSH key pair configured
Setup¶
1. Configure Inventory¶
2. Configure Variables¶
3. Initial Provisioning¶
This installs:
- Python, PostgreSQL, Redis
- Caddy reverse proxy
- Systemd service files
4. Deploy Application¶
Features¶
- Caddy with automatic HTTPS
- Systemd for service management
- Zero-downtime deployments
- Automatic rollback on failure
- Database backups configuration
Updating¶
# Deploy new version
ansible-playbook -i inventory/hosts playbooks/deploy.yml --extra-vars "version=v1.1.0"