This project automates deploying React apps (or similar frontend projects) directly from GitHub repositories. It clones the repo, builds it using Bun, and deploys the output to an S3-compatible storage service, making it publicly accessible via a unique URL.
The system consists of several containerized services working together:
┌─────────────┐
│ Frontend │
│ (Vite) │
└──────┬──────┘
│
▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Service 1 │ │ RabbitMQ │ │ Service 2 │
User Input │ │ Queue │ │ Queue │ │ Deploy
(GitHub URL) ──────► API Server ├─────────► Message ├────────► Build ├─────► S3 Storage
│ │ │ Broker │ │ Service │
└──────┬──────┘ └─────────────┘ └──────┬──────┘
│ │
│ ┌─────────────┐ │
└─────────────────► Redis ◄──────────────┘
│ (Storage) │
└─────────────┘
Everything runs in containers, with a simple service-based design:
- Frontend (React + Vite): User submits a GitHub repo URL for deployment.
- API Server (Service 1):
- Accepts GitHub URLs, generates a tracking ID
- Stores deployment status in Redis
- Queues jobs via RabbitMQ
- Exposes endpoints to check status
- Build Service (Service 2):
- Clones repo, installs dependencies using Bun
- Runs
bun run build
- Uploads built files to S3
- Updates status in Redis
- RabbitMQ: Message broker handling three queues (
bridge_queue
,cloned_queue
,build_queue
) - Redis: Tracks deployment status, providing fast lookups
- Docker & Docker Compose
- S3-compatible storage (AWS S3, DigitalOcean Spaces, etc.)
- S3 credentials (access key, secret key, endpoint, bucket name)
git clone https://github.com/biohacker0/Hostify.git
cd Hostify
Update docker-compose.yml
with your S3 credentials:
service2:
environment:
- S3_ENDPOINT=your-endpoint.digitaloceanspaces.com
- S3_BUCKET_NAME=your-bucket-name
- AWS_ACCESS_KEY_ID=your-access-key
- AWS_SECRET_ACCESS_KEY=your-secret-key
docker compose up -d
http://localhost:5173
- Enter a GitHub repo URL.
- Get a tracking ID and deployment URL.
- Monitor deployment status.
- Access the deployed app via the generated URL.
- Repo Submission → API server assigns a UUID, queues it.
- Cloning → Build service clones the repo, updates status, pushes job to
cloned_queue
. - Building → Runs
bun install
&bun run build
, updates status, pushes job tobuild_queue
. - Deploying → Uploads output to S3, finalizes status, returns the deployed URL.
- RabbitMQ UI → http://localhost:15672 (guest/guest)
- Redis Insight → http://localhost:5540
- Logs →
docker compose logs service1
/docker compose logs service2
- Must be a JS/TS frontend project (React, Vue, etc.)
- Needs a
package.json
with:- Dependencies installable via
bun install
- A build script running via
bun run build
- Dependencies installable via
- Build output should be in
dist/
orbuild/
- Deployment failed? Check
docker compose logs service2
. - Frontend can't connect? Run
docker compose ps
to check service health. - Build errors? Ensure the repo has the correct structure & scripts.
Each deployment has one of these statuses:
processing
→ Initial staterepo cloned successfully
→ Cloning completedrepo built successfully
→ Build completedrepo deployed successfully
→ Deployment completeddeployment failed
→ Something went wrong