I'm always excited to take on new projects and collaborate with innovative minds.

Social Links

Project

PHP Laravel Application Deployment Using Docker, Ansible, and Jenkins

Deployed a PHP Laravel application using microservices architecture with Docker, Docker Compose, Ansible, and Jenkins. Implemented CI/CD pipeline for automated builds, testing, and deployment, with local infrastructure managed using Vagrant.

Client

For me

Start Date

Nov 14, 2023
PHP Laravel Application Deployment Using Docker, Ansible, and Jenkins

Description: 

This project focused on transforming a PHP Laravel monolithic application into a microservices-based architecture using DevOps best practices. The application required PHP, MySQL, and Apache, and was restructured into separate containers using Docker. A Dockerfile was created for building a custom image with PHP and Apache. Docker Compose was used to define and orchestrate the microservices, including the Laravel application, MySQL database, and PHPMyAdmin interface for database management.

Ansible playbooks were developed to automate the creation and deployment of Docker containers and Docker Compose configurations. For continuous integration and delivery (CI/CD), Jenkins was set up with a pipeline script (Jenkinsfile) to automate the build and deployment process. Additionally, a GitHub Actions workflow was implemented to update the Docker image automatically on DockerHub when changes were pushed to the main branch.

Due to AWS account restrictions, Vagrant was used to create virtual machines for local infrastructure, where Jenkins was installed and configured to read pipeline scripts from GitHub, enabling a fully automated local deployment environment.

Key Features:

  • Microservices Architecture: Segmented the PHP Laravel application into distinct microservices using Docker containers.
  • Automation with Ansible: Created playbooks for automating Dockerfile and Docker Compose builds and deployments.
  • CI/CD Pipeline: Configured Jenkins with a two-stage pipeline for building the Docker image and running Docker Compose. Integrated GitHub Actions for automatic updates.
  • Local Infrastructure with Vagrant: Deployed Jenkins on a virtual machine using Vagrant for local testing and deployment due to AWS account limitations.
  • Database Integration: Managed MySQL database service using Docker Compose, with PHPMyAdmin for GUI-based interaction.
  • Error Handling and Testing: Implemented comprehensive testing and troubleshooting steps for container builds and deployments.

Technologies Used:

  • Docker
  • Docker Compose
  • Ansible
  • Jenkins (Jenkinsfile)
  • GitHub Actions
  • Vagrant
  • PHP Laravel
  • MySQL
  • PHPMyAdmin
  • Terraform (intended for AWS deployment)
  • Apache
  • Nginx (for reverse proxy)
Share

Leave a comment

Your email address will not be published. Required fields are marked *