Farmona

DevOps infrastructure for an e-commerce platform

About the project

The project included preparing and maintaining a production environment for a Magento-based e-commerce platform supporting several online stores.

A key element was to design an infrastructure enabling stable system operation and to implement an automated implementation process that minimizes the risk of downtime during the publication of developer changes.

The solution is based on the Docker container environment and an automated CI/CD pipeline, which enables quick and secure deployment of new application versions.

The Goal of DevOps

The main goal of DevOps activities was to launch a stable production environment for the Magento application and implement an automated deployment process.

The solution was to ensure:

  • minimizing downtime when publishing changes
  • ability to safely deploy new versions of the application
  • high availability of the e-commerce platform
  • stable support for growing user traffic
Design challenges

The biggest challenge was implementing the blue-green deployment strategy in the Docker environment for a platform supporting multiple online stores. In the standard system update process, downtime could reach up to about 40 minutes. By implementing the blue-green deployment strategy, it was possible to eliminate long downtimes and ensure smooth traffic switching between application versions.

CI/CD and the implementation process

The CI/CD process was automated using Jenkins.

Pipeline includes:

  • building application images in Docker technology
  • publishing images to a private Docker registry
  • deploying new versions of applications in the production environment

To reduce downtime, a blue-green deployment strategy was used.

The new version of the application is launched in parallel with the currently running system instance, and the traffic is switched only after the new environment has been fully verified.

This approach allows to:

  • minimize implementation risk
  • reduce downtime to a minimum
  • quickly restore the previous version of the system in the event of problems

Infrastructure and system architecture

Infrastructure architecture

The project uses a dedicated server located in a Polish data center, which was already part of the client’s infrastructure.

This approach made it possible to:

 

  • meet the performance requirements of the Magento platform,
  • adapt the infrastructure to the forecast traffic volume
  • optimize costs by using existing resources

The environment is based on Docker containers managed using Docker Compose.

System architecture

The system consists of several key components running in a containerized environment:

 

  • Magento application (PHP)
  • MySQL database
  • Elasticsearch search engine
  • Redis cache layer
  • Nginx server handling static files and HTTP traffic

Each component runs as a separate container, and communication between them takes place within the internal Docker network.

External access to the system is provided through a reverse proxy layer based on Nginx, which is responsible for handling user traffic and redirecting requests to the appropriate application services.

Monitoring, security and maintenance

The efficiency and security of the environment are ensured through continuous system monitoring and ongoing analysis of infrastructure parameters.

The Netdata tool was used for monitoring, which allows tracking the performance of servers and applications in real time. If problems are detected, the system automatically sends email notifications.

The following are also performed regularly:

  • database backups
  • backups of static files and critical application files

Backups are synchronized with a server in another data center, allowing for quick system recovery in the event of a failure.

Let's talk about your project

Describe your needs and we will come back with a proposal tailored to your business.

Contact