This is a how-to including scripts about how to auto-scale WordPress across multiple EC2 instances on AWS with using Docker for deploying the WordPress core, RDS for the managed MySQL database server and CloudFront with S3 for delivering static files.
- Docker (installed on your development machine)
- AWS account
$ docker build -t janloeffler/wordpress-aws-scaler:0.1 .
$ docker run -p 80:80 -it janloeffler/wordpress-aws-scaler:0.1
Visit http://localhost/! Stop your server with Ctrl+C.
$ docker push janloeffler/wordpress-aws-scaler:0.1
Select a database type in AWS RDS:
- Amazon Aurora (high performance, works only on new DB.r3 instances)
- MySQL DB
- Maria DB
Choose a EC2 resource type: e.g. db.t2.small (1 vCPU, 1 GiB RAM)
Select "Multi-AZ Deployment" to have Amazon RDS maintain a synchronous standby replica in a different Availability Zone than the DB instance. Amazon RDS will automatically fail over to the standby in the case of a planned or unplanned outage of the primary. Learn More at http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html
tbd