AutoDeployHub is a self-hosted CI/CD and deployment platform. It automates the process of building Docker images and deploying them to Kubernetes clusters whenever code is pushed to GitHub.
- Backend: FastAPI (Python 3.13)
- Database: PostgreSQL (with SQLAlchemy & Alembic)
- Containerization: Docker
- Orchestration: Kubernetes (Official Python Client)
- Security: HMAC Webhook Signature Verification
- UI: Jinja2 + Bootstrap 5 Dashboard
- Automated CI/CD Pipeline: Orchestrates code cloning, Docker building, and Kubernetes deployment.
- Kubernetes Integration: Native support for deploying apps and services using the official K8s client.
- Docker Management: Automated image building and manual image cleanup (RMI) from the UI.
- GitHub OAuth: Secure private dashboard access synchronized with GitHub accounts.
- Webhook Security: HMAC-SHA256 signature verification for all incoming GitHub push events.
- JWT Sessions: Secure session management using encrypted HttpOnly cookies.
- Real-time Deployment Logs: Detailed, timestamped logs for every phase of the deployment process.
- Visual Dashboard: View project health, deployment history, and local infrastructure status.
- Manual Triggers & Rollbacks: Trigger deployments manually or rollback to any previous successful build.
- Docker & Docker Desktop (with Kubernetes enabled)
- Git
- Clone this repository.
- Navigate to the root directory.
- Start the services:
docker-compose up -d
- Run migrations:
cd backend # Ensure your virtual env is active alembic upgrade head
- Register a Project:
Open the API docs at
http://localhost:8000/docsand use thePOST /projects/endpoint to register your GitHub repository. - Setup Webhook:
Go to your GitHub Repo -> Settings -> Webhooks.
- Payload URL:
http://<your-server>/webhooks/github - Content type:
application/json - Secret: (Check
GITHUB_WEBHOOK_SECRETinconfig.py)
- Payload URL:
- Push Code:
Push to your specified branch. AutoDeployHub will:
- Clone the repo.
- Build a Docker image using the
Dockerfilein the repo root. - Deploy/Update the service in your Kubernetes cluster.
Access the visual dashboard at http://localhost:8000/ to monitor your projects and see logs of recent deployments.
To enable GitHub OAuth:
- Go to your GitHub Developer Settings and create a "New OAuth App".
- Set Homepage URL to
http://localhost:8000 - Set Authorization callback URL to
http://localhost:8000/auth/callback - Copy the Client ID and Client Secret.
- Update
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETin yourbackend/.envfile. - Restart your backend.