EzDeploy is a modern, cloud-native deployment platform that enables seamless deployment of web applications directly from Git repositories. Built with a microservices architecture, EzDeploy automatically builds and deploys your projects to a scalable infrastructure.
Demo Video - https://youtu.be/OkHAuKnk19s
- One-Click Deployment: Deploy any web application from a Git repository with a single API call
- Real-time Build Logs: Monitor your deployment progress with live WebSocket connections
- Auto-Detection: Automatically detects build outputs (dist, build, out, public directories)
- Subdomain Routing: Each deployment gets its own subdomain for easy access
- Scalable Architecture: Built on AWS ECS Fargate for automatic scaling
- S3 Static Hosting: Deployed applications are served from AWS S3 with CloudFront-like proxy
- Redis Integration: Real-time communication and logging via Redis pub/sub
EzDeploy consists of four main components:
The main API gateway that handles deployment requests and manages the build pipeline.
Key Features:
- Express.js REST API for deployment requests
- WebSocket server for real-time build logs
- AWS ECS task orchestration
- Redis pub/sub for log streaming
- Environment validation and error handling
Endpoints:
POST /project- Deploy a new projectGET /health- Health check endpointGET /debug- Debug and configuration info
A containerized build environment that clones, builds, and uploads projects.
Key Features:
- Docker-based build environment with Node.js 20
- Git repository cloning
- Automatic build detection (
npm install && npm run build) - S3 upload with proper MIME types
- Real-time log publishing to Redis
A modern Next.js frontend application that provides a user interface for managing deployments.
Technology Stack:
- Frontend: Next.js 15 with React 19 and TypeScript
- Styling: Tailwind CSS v4 with responsive design
- Database: PostgreSQL with Drizzle ORM
- Authentication: Better Auth for secure user management
- Real-time: Socket.IO client for live build monitoring
- Icons: Lucide React for consistent iconography
Key Features:
- Modern, responsive user interface
- Real-time deployment monitoring with WebSocket integration
- Secure user authentication and session management
- Database-driven deployment tracking and analytics
- Interactive deployment form with validation
- Live build logs and status updates
Pages & Components:
- Landing Page: Modern hero section with features showcase and call-to-action
- Deploy Page: Interactive deployment form with real-time build monitoring
- Authentication: Secure sign-in/sign-up with Better Auth integration
- Documentation: Comprehensive API and usage documentation
- Dashboard: Analytics and deployment management interface
- Architecture View: Interactive system architecture visualization
A lightweight proxy server that routes subdomain requests to the appropriate S3 objects.
Key Features:
- Subdomain-based routing
- S3 static file serving
- Automatic
index.htmlresolution - Express.js with http-proxy middleware
Before setting up EzDeploy, ensure you have:
- AWS Account with the following services configured:
- ECS Cluster with Fargate tasks
- S3 bucket for static file hosting
- VPC with subnets and security groups
- Redis Instance (AWS ElastiCache or external)
- PostgreSQL Database (for user management and deployment tracking)
- Docker (for building the build-server image)
- Node.js 18+ for running the services
git clone <your-repo-url>
cd EzDeployCreate .env files for each service:
# Redis Configuration
REDIS_KEY=redis://your-redis-connection-string
# AWS ECS Configuration
REGION=ap-southeast-2
ACCESS_KEY=your-aws-access-key
SECRET_ACCESS=your-aws-secret-key
# S3 Configuration
S3_BUCKET=your-s3-bucket-name
S3_ACCESS_KEY=your-s3-access-key
S3_SECRET_ACCESS_KEY=your-s3-secret-key
S3_REGION=ap-southeast-2
# Server Configuration
PORT=9000
SOCKET_PORT=9999The build server receives environment variables through ECS task overrides:
GIT_REPOSITORY__URL- Git repository URL to clonePROJECT_ID- Unique project identifierREDIS_KEY- Redis connection stringS3_BUCKET- S3 bucket nameS3_ACCESS_KEY- S3 access keyS3_SECRET_ACCESS_KEY- S3 secret keyS3_REGION- S3 region
# Add any specific configuration for the proxy
PORT=8000# Database Configuration
DATABASE_URL=postgresql://username:password@localhost:5432/ezdeploy
# Authentication
AUTH_SECRET=your-auth-secret-key
# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:9000
NEXT_PUBLIC_SOCKET_URL=http://localhost:9999Update the ECS configuration in api-server/index.js:
const config = {
CLUSTER: "arn:aws:ecs:your-region:your-account:cluster/your-cluster",
TASK: "arn:aws:ecs:your-region:your-account:task-definition/your-task",
};Update the network configuration with your VPC subnets and security groups:
networkConfiguration: {
awsvpcConfiguration: {
assignPublicIp: "ENABLED",
subnets: [
"subnet-xxxxxxx",
"subnet-yyyyyyy",
"subnet-zzzzzzz",
],
securityGroups: ["sg-xxxxxxx"],
},
}cd build-server
docker build -t your-registry/ezdeploy-builder .
docker push your-registry/ezdeploy-builderUpdate your ECS task definition to use this image.
cd api-server
npm install
node index.jscd s3-reverse-proxy
npm install
node index.jscd client
npm install
# Set up environment variables
copy .env.example .env.local
# (Edit .env.local with your configuration)
# Set up database
npx drizzle-kit generate
npx drizzle-kit push
# Start development server
npm run devThe web client will be available at http://localhost:3000
- Web Interface: Open http://localhost:3000 to access the EzDeploy dashboard
- API Server: Available at http://localhost:9000 for direct API calls
- Deployed Projects: Access via subdomain routing through the reverse proxy at http://project-name.localhost:8000
Send a POST request to the API server, or use the web interface:
Option 1: Web Interface
- Navigate to http://localhost:3000
- Sign in or create an account
- Use the deployment form to enter your Git repository URL
- Monitor the build progress in real-time
Option 2: Direct API Call
curl -X POST http://localhost:9000/project \
-H "Content-Type: application/json" \
-d '{
"gitURL": "https://github.com/username/repository.git",
"slug": "my-project"
}'Response:
{
"status": "queued",
"data": {
"projectSlug": "my-project",
"url": "http://my-project.localhost:8000"
}
}Option 1: Web Interface The web client provides a real-time dashboard for monitoring deployments:
- Navigate to the Deploy page after starting a deployment
- View live build logs with automatic scrolling
- See deployment status updates (queued, building, success, failed)
- Access deployment URLs directly from the interface
Option 2: WebSocket Connection Connect to the WebSocket server to receive real-time build logs:
const io = require('socket.io-client');
const socket = io('http://localhost:9999');
socket.on('connect', () => {
socket.emit('subscribe', 'logs:my-project');
});
socket.on('message', (data) => {
console.log('Build log:', data);
});Use the provided test script or the web interface:
Option 1: Web Interface
- Open http://localhost:3000
- Navigate to the Deploy page
- Enter a Git repository URL
- Monitor the real-time build progress
Option 2: Command Line Testing
cd api-server
node test-deployment.jsEzDeploy/
├── api-server/
│ ├── index.js # Main API server
│ ├── package.json # Dependencies and scripts
│ └── test-deployment.js # Testing utility
├── build-server/
│ ├── script.js # Build and upload logic
│ ├── main.sh # Git clone script
│ ├── Dockerfile # Container definition
│ └── package.json # Dependencies
├── client/
│ ├── src/
│ │ ├── app/ # Next.js app directory
│ │ │ ├── components/ # React components
│ │ │ ├── deploy/ # Deployment page
│ │ │ ├── documentation/# Documentation page
│ │ │ └── signin/ # Authentication page
│ │ └── db/ # Database schema and migrations
│ ├── public/ # Static assets
│ ├── package.json # Frontend dependencies
│ ├── next.config.ts # Next.js configuration
│ ├── drizzle.config.ts # Database configuration
│ └── README.md # Frontend documentation
├── s3-reverse-proxy/
│ ├── index.js # Proxy server
│ └── package.json # Dependencies
└── README.md # This documentation
The web client requires a PostgreSQL database. Set up the database:
- Create PostgreSQL Database:
CREATE DATABASE ezdeploy;
CREATE USER ezdeploy_user WITH PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE ezdeploy TO ezdeploy_user;- Configure Database URL:
Update your
.env.localfile in the client directory:
DATABASE_URL="postgresql://ezdeploy_user:your_password@localhost:5432/ezdeploy"- Run Database Migrations:
cd client
npx drizzle-kit generate
npx drizzle-kit pushEzDeploy automatically detects and builds projects that:
- Have a
package.jsonfile - Support
npm install && npm run build - Output built files to one of these directories:
dist/build/out/public/
| Variable | Description | Example |
|---|---|---|
REDIS_KEY |
Redis connection string | redis://localhost:6379 |
REGION |
AWS region | ap-southeast-2 |
ACCESS_KEY |
AWS access key | AKIAIOSFODNN7EXAMPLE |
SECRET_ACCESS |
AWS secret key | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
S3_BUCKET |
S3 bucket name | my-deployments-bucket |
S3_ACCESS_KEY |
S3 access key | AKIAIOSFODNN7EXAMPLE |
S3_SECRET_ACCESS_KEY |
S3 secret key | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
S3_REGION |
S3 region | ap-southeast-2 |
| Variable | Description | Example |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | postgresql://user:pass@localhost:5432/ezdeploy |
AUTH_SECRET |
Authentication secret key | your-32-character-secret-key |
NEXT_PUBLIC_API_URL |
API server URL | http://localhost:9000 |
NEXT_PUBLIC_SOCKET_URL |
WebSocket server URL | http://localhost:9999 |
| Variable | Description | Default |
|---|---|---|
PORT |
API server port | 9000 |
SOCKET_PORT |
WebSocket server port | 9999 |
| Variable | Description | Default |
|---|---|---|
PORT |
Next.js development server port | 3000 |
Deploy a new project from a Git repository.
Request Body:
{
"gitURL": "string (required) - Git repository URL",
"slug": "string (optional) - Custom project slug"
}Response:
{
"status": "queued",
"data": {
"projectSlug": "string - Generated or provided slug",
"url": "string - Deployment URL"
}
}Error Response:
{
"status": "error",
"message": "string - Error description",
"error": "string - Technical error details"
}Health check endpoint.
Response:
{
"status": "healthy",
"timestamp": "2025-05-26T10:30:00.000Z"
}Debug and configuration information.
Response:
{
"status": "debug",
"config": {
"cluster": "arn:aws:ecs:...",
"task": "arn:aws:ecs:...",
"region": "ap-southeast-2",
"hasCredentials": true
}
}- Request Received: API server receives deployment request
- Task Creation: ECS Fargate task is created with build environment
- Git Clone: Build server clones the repository
- Build Execution: Runs
npm install && npm run build - File Upload: Built files are uploaded to S3 with proper structure
- Log Broadcasting: Real-time logs are sent via Redis/WebSocket
- Deployment Ready: Project is accessible via subdomain
The build server uses a custom Ubuntu-based image with:
- Ubuntu Focal (20.04)
- Node.js 20.x
- Git
- npm/npx
Dockerfile highlights:
FROM ubuntu:focal
RUN apt-get update
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y nodejs git
WORKDIR /home/app
COPY main.sh script.js package*.json ./
RUN npm install
ENTRYPOINT ["/home/app/main.sh"]- Environment Variables: Sensitive credentials are passed via ECS task overrides
- Network Security: ECS tasks run in private subnets with security groups
- S3 Permissions: Use IAM roles with minimal required permissions
- Input Validation: Git URLs and slugs are validated before processing
- Error Handling: Detailed errors are logged but sanitized in API responses
- Symptom: Build process exits with non-zero code
- Solution: Check that your project has valid
package.jsonand build script
- Symptom: Tasks fail to start or exit immediately
- Solution: Verify ECS cluster configuration, subnet access, and security groups
- Symptom: Logs not appearing in real-time
- Solution: Check Redis connection string and network access
- Symptom: Files not appearing in deployed site
- Solution: Verify S3 permissions and bucket configuration
- Symptom: Authentication or database errors in web client
- Solution: Verify PostgreSQL is running and DATABASE_URL is correct
- Symptom: Next.js application fails to start or build
- Solution: Check Node.js version (18+) and run
npm installin client directory
# Check API server logs
node api-server/index.js
# Test deployment API
node api-server/test-deployment.js
# Check web client locally
cd client && npm run dev
# Check build status in ECS
aws ecs list-tasks --cluster your-cluster-name
# View build server logs
aws logs get-log-events --log-group /ecs/builder-task
# Check database connection
cd client && npx drizzle-kit studioaws logs get-log-events --log-group /ecs/builder-task
cd client && npx drizzle-kit studio
## 🤝 Contributing
1. Fork the repository
2. Create a feature branch: `git checkout -b feature-name`
3. Make your changes and test thoroughly
4. Commit your changes: `git commit -am 'Add feature'`
5. Push to the branch: `git push origin feature-name`
6. Submit a pull request
## 📄 License
This project is licensed under the ISC License.
## 🆘 Support
For support and questions:
- Create an issue in the repository
- Check the troubleshooting section above
- Review AWS ECS and S3 documentation for infrastructure issues
---
**EzDeploy** - Making web deployment as easy as a single API call! 🚀