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.
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
Is this a reasonable structure for automating deployment of frontend and backend on a single EC2 Free Tier instance?
Yes, Use codepipeline Actions and automate it with deploying to ec2 action
without using codedpeloy. Wrote blog so take a look.
ref: https://dev.to/aws-builders/simplify-your-ec2-application-deployment-pipeline-by-90-2mbk
Bonus you can also automate building docker and pushing image to eco using action (https://dev.to/aws-builders/build-publish-secure-aws-codepipeline-now-simplifies-ecr-publishing-and-vulnerability-scans-2j43)
I'm experiencing disk usage issues on EC2. Could it be due to the GitHub Actions → S3 → CodeDeploy → Docker process?
There is no way to tell like that. My recommendation
What are some best practices or alternatives for lightweight, long-running CI/CD pipelines on EC2(FREE TIER)?
use Codepipeline and its native actions.Easy to setup and good UI support as well which makes it very maintainable. No need to setup Codeploy or codebuild.