Ci Cd For Deploying Docker Application On Ec2 With Github Actions

Leo Migdal
-
ci cd for deploying docker application on ec2 with github actions

Learn through the super-clean Baeldung Pro experience: No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with. Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive. Orkes is the leading workflow orchestration platform built to enable teams to transform the way they develop, connect, and deploy applications, microservices, AI agents, and more. With Orkes Conductor managed through Orkes Cloud, developers can focus on building mission critical applications without worrying about infrastructure maintenance to meet goals and, simply put, taking new products live faster and reducing total...

This project demonstrates a 3-tier application CI/CD pipeline implemented using Docker and GitHub Actions. The pipeline automates code changes, triggering builds, tests, and deployments into Docker containers. These containers are then deployed to an EC2 instance, ensuring a seamless and efficient delivery process for modern applications. If you find this project helpful, please star the repository on GitHub to show your support: Jibran Passionate DevOps Engineer and Software Developer. Connect with me on LinkedIn.

Contributions are welcome! Feel free to fork the repository and submit a pull request. This guide explains how to set up a CI/CD pipeline to automatically deploy a Dockerized FastAPI app (or any containerized app) to an EC2 instance using GitHub Actions. Create a new SSH key pair (locally or in CI): You can have multiple lines in authorized_keys. Then log out and log back in (or reboot):

Go to your GitHub repo → Settings → Secrets and variables → Actions, and add: Tired of manually deploying your applications? What if you could push code to GitHub, run tests automatically, and deploy updates to your live server—without lifting a finger? That’s exactly what I did with my FastAPI project using CI/CD. I’ll walk you through how I set up a Continuous Integration (CI) pipeline to automatically test my code... Continuous Deployment (CD) pipeline to push updates to an AWS EC2 instance.

TL-DR; Integrating and Delivering a new version of the product through a series of automated steps. Manually updating the version of any application is time consuming and error prone and thus the need for automation arised. Do not open ports to the internet. For my current setup only port 80 is limited to CloudFront, and rest are opened to only my IP. Are you wondering how I'm able to deploy from the Github Runner if it cannot access the EC2? Let's see the pipeline.

Let's see the yaml code that make the ci/cd pipeline allowing build, test and deploy dockerized apps. Deploying your project is a crucial step in the software development process and marks a significant milestone. However, it can often feel challenging! In this guide, I’ll walk you through how I deployed a simple project I created for an interview round and demonstrate one of the easiest ways to deploy your project. First, here is an overview of my service architecture. The configurations here that I am refering to is the environmental variables.

The environmental variables declared throughout the project for the different tech stacks to be connected together. The environment variables declared here will be filled in by the workflow file (specifically your github secrets). The variables declared in this file are used to connect the program to its database (Amazon's RDS in my case), and to use JWT in User authentication. 💡 A JWT secret key is a string used to sign and verify JSON Web Tokens (JWTs). It ensures that the token is valid and hasn't been tampered with. 💡

People Also Search

Learn Through The Super-clean Baeldung Pro Experience: No Ads, Dark-mode

Learn through the super-clean Baeldung Pro experience: No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with. Modern software architecture is often broken. Slow delivery leads to missed opportunities, innovation is stalled due to architectural complexities, and engineering resources are exceedingly expensive. Orkes is the leading workflow orchestration platform built to enabl...

This Project Demonstrates A 3-tier Application CI/CD Pipeline Implemented Using

This project demonstrates a 3-tier application CI/CD pipeline implemented using Docker and GitHub Actions. The pipeline automates code changes, triggering builds, tests, and deployments into Docker containers. These containers are then deployed to an EC2 instance, ensuring a seamless and efficient delivery process for modern applications. If you find this project helpful, please star the repositor...

Contributions Are Welcome! Feel Free To Fork The Repository And

Contributions are welcome! Feel free to fork the repository and submit a pull request. This guide explains how to set up a CI/CD pipeline to automatically deploy a Dockerized FastAPI app (or any containerized app) to an EC2 instance using GitHub Actions. Create a new SSH key pair (locally or in CI): You can have multiple lines in authorized_keys. Then log out and log back in (or reboot):

Go To Your GitHub Repo → Settings → Secrets And

Go to your GitHub repo → Settings → Secrets and variables → Actions, and add: Tired of manually deploying your applications? What if you could push code to GitHub, run tests automatically, and deploy updates to your live server—without lifting a finger? That’s exactly what I did with my FastAPI project using CI/CD. I’ll walk you through how I set up a Continuous Integration (CI) pipeline to automa...

TL-DR; Integrating And Delivering A New Version Of The Product

TL-DR; Integrating and Delivering a new version of the product through a series of automated steps. Manually updating the version of any application is time consuming and error prone and thus the need for automation arised. Do not open ports to the internet. For my current setup only port 80 is limited to CloudFront, and rest are opened to only my IP. Are you wondering how I'm able to deploy from ...