During this short exercise you will learn how to create a simple LAMP example application and deploy it using Docker on the Amazon Web Services ECS platform, with the help of RDS for a MySQL database.
All the following example is based on the AWS CLI, though we could have done faster and easier using the web based console. Instead, having gained a skill with the terminal interface, allows us to better understand how each step and parameter is working. In addition we will be able to create our own automation scripts based on the CLI.
The prerequites for this tutorial are the installation of the AWS CLI and the ECS CLI. If you haven’t them installed on your system, please refer to these links on how to do it: install the AWS CLI and the ECS CLI.
In this short lesson we’re gonna focus on two topics we tackled some time ago in this mini series of tutorials: Laravel and Docker.
In the getting started section of the Laravel project’s documentation we can see that a vagrant box named Homestead is strongly adviced to begin with a quick and smooth developing experience.
Homestead is pre-packed with all the stuff necessary to begin the development of a Laravel application, but when it comes to deploying any application, Docker has many strong points that other virtual environments have not. In many cases it is a must: see this article of mine for further details.