The primary pipeline uses AWS CodePipeline, integrating GitHub, CodeBuild, and CodeDeploy to automate the complete release process. When updates are pushed to the repository, CodeBuild installs dependencies, processes assets, and prepares the application bundle while pulling sensitive values from AWS Secrets Manager. CodeDeploy then updates the EC2 instance, reloads environment variables, and restarts Apache. A custom domain configured via Route 53 points to the server, and HTTPS is enabled with Certbot to ensure secure access.
Parallel to this, a Jenkins pipeline provides an additional deployment path. Running on an EC2 instance, Jenkins fetches the source code, executes build and test steps, and deploys updates to a DigitalOcean server configured with Gunicorn and Nginx. It handles migrations, static asset preparation, and service restarts. The DigitalOcean server is mapped to a domain purchased externally, and Certbot is used to generate and maintain SSL certificates for secure communication.
For improved reliability, the Jenkins pipeline also deploys to a secondary AWS EC2 instance, functioning as a backup environment. This ensures continuous availability if the primary server experiences downtime. The combination of AWS CodePipeline and Jenkins forms a flexible, resilient CI/CD architecture that automates deployment across multiple infrastructures, maintains synchronized environments, and supports secure, production-ready operations.