Welcome to the CloudBuilder project! This repository contains a suite of services designed to automate the deployment of web applications using a microservices architecture. Each component of the project plays a specific role, from managing front-end interactions to handling backend operations and reverse proxy configurations.
The CloudBuilder project consists of the following services:
- Frontend: A Next.js application that provides a user interface for submitting and monitoring web application builds.
- Build Server: A Docker-based service that builds JavaScript web applications and manages deployments on AWS ECS.
- API Server: A Node.js application that handles requests between the frontend and the build server.
- Reverse Proxy: Manages routing of requests to the appropriate project subdomains and serves built files from AWS S3.
Below are the general steps to set up each service. Each service's directory contains a more detailed README with specific instructions and configuration details.
- Install Dependencies: Navigate to the frontend directory and install the necessary dependencies:
Alternatively, if you prefer
npm install
yarn,pnpm, orbun, corresponding instructions are available in the service-specific README. - Run the Application:
npm run dev
- Setup AWS ECR:
- Create an AWS Elastic Container Registry (ECR) repository.
- Follow the AWS-provided instructions to build and push the Docker image to the ECR repository.
- Setup AWS ECS:
- Create an AWS Elastic Container Service (ECS) cluster.
- Connect the cluster to the Docker image stored on ECR to start the deployment.
- Install Dependencies:
npm install
- Run the Application:
node index.js
- Install Dependencies:
npm install
- Run the Application:
node index.js
Sample environment (.env) files are provided in each service directory. These files outline the necessary environment variables.
- Build Server & API Server: Set
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYto your AWS credentials to allow access to AWS services. - Frontend & Reverse Proxy: These services do not require any specific environment variables.
- S3 Bucket Accessibility: Ensure the S3 bucket where the build artifacts are stored is publicly accessible.
- ECS Subnets Configuration: Verify that the ECS subnets are correctly set to ensure proper network configurations.
- Environment Variables: Double-check that all required environment variables are correctly set up in your environment. Check for any hard-coded values that need to be updated.
For more detailed information, refer to the README files in each service's directory. These documents provide specific setup instructions, additional configuration options, and detailed troubleshooting tips.
Thank you for using or contributing to the CloudBuilder project! We hope this automation tool enhances your development workflow and deployment processes.