Deploy a PHP app to AWS EKS cluster through Razorops

Cluster: AWS EKS Docker Image Registry: AWS ECR Versioning Control Tool: Github CI/CD pipeline tool: Razorops

Prerequisites:

Deploying a PHP website on AWS EKS will have the same steps as we have seen in the tutorial Deploying A rails app on AWS EKS through RazorOps. The only difference is that of Dockerfile for a genuine reason.

AS per PHP dependencies and its commands, Dockerfile is usually looks like as below:


FROM nimmis/apache-php5

MAINTAINER Razorops <support@razorops>

ADD . /var/www/public

WORKDIR /var/www/public

EXPOSE 80
EXPOSE 443

CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]

Please note that you take care of ports mentioned in the Deployment.yaml file and in Dockerfile. Both should be same.

In our example of deployment.yaml file, we have mentioned ports 3000. Do change either deployment.yaml file or your dockerfile.