DEV Community

Cover image for Sample PHP Application deploy using AWS CodePipeline, Elastic Beanstalk & Github
Lasantha Sanjeewa Silva
Lasantha Sanjeewa Silva

Posted on

Sample PHP Application deploy using AWS CodePipeline, Elastic Beanstalk & Github

First of all, we want to create sample PHP Application and push this application to Github. If you want you can use following sample repository.
https://github.com/sanju2/cicd_app

After that go to AWS Management Console and Search Elastic Beanstalk and Create PHP Application.

Alt Text

Give the Application name and Add Application tags. After that select platform as PHP and platform version. Finally, the Application Code selects as a Sample Application.

Alt Text

After that, you can see Elastic Beanstalk environment status is OK.

Alt Text

Go to URL and view the sample application.

Alt Text

Go to AWS management console and search CodePipeline and create pipeline.

Alt Text

Adding details for following fields and click Next.

Alt Text

Next to adding the source stage as Github and connect to Github. After that select your repository and Branch.

Alt Text

Next, go to the deploy stage and select Elastic Beanstalk as a deploy provider, and select Application Name and Environment Name.

Alt Text

After that, you can see the source and deploy succeeded.

Alt Text

Go to Elastic Beanstalk and click URL. After that, you can see your application deployed.

Alt Text

Change code as V1 and push to Github. After that, you can see your code pipeline triggers the changes.

Alt Text

After that refresh, the previous URL and you can see the latest changes appear here.

Alt Text

Thanks for reading the Article.

Discussion (0)