How should I structure CI/CD for a Docker-based frontend and backend on AWS EC2 Free Tier?
11:29 07 Jul 2025

I'm a beginner web developer trying to learn about CI/CD and deployment automation.

I built a simple full-stack web application and deployed it using only AWS EC2 (Free Tier).

Here's how I set up my deployment:

  • GitHub Actions builds the project and uploads a .jar file to S3.

  • AWS CodeDeploy fetches the .jar from S3 and deploys it on the EC2 instance.

  • Using Docker to run both the frontend (Next.js) and backend (Spring Boot) container.

  • Nginx is used as a reverse proxy to route requests appropriately.


What I want to know

  • Is this a reasonable structure for automating deployment of frontend and backend on a single EC2 Free Tier instance?

  • I'm experiencing disk usage issues on EC2. Could it be due to the GitHub Actions → S3 → CodeDeploy → Docker process?

  • What are some best practices or alternatives for lightweight, long-running CI/CD pipelines on EC2(FREE TIER)?

*This is a small project, and I want to keep it running reliably over time, even if it's small.


Any advice on improving this setup, or key topics I should study to better manage CI/CD pipelines on EC2

amazon-web-services git amazon-ec2 cicd