Auto-deploy web apps to <project>.benkruseski.com subdomains from GitHub pushes.
- You push to a project's GitHub repo
- GitHub sends a webhook to
hooks.benkruseski.com/webhook - CTSDeploy reads
deploy.yamlfrom the repo root - Runs
git pull+docker compose up -d --build - Writes/updates the nginx config for
<project_name>.benkruseski.com
On the Raspberry Pi:
- nginx installed
- Docker + Docker Compose installed
- Python 3.10+
- A Cloudflare account managing
benkruseski.com
Add a wildcard A record pointing to your Pi's static IP:
| Type | Name | Value |
|---|---|---|
| A | *.benkruseski.com |
<your Pi IP> |
| A | hooks.benkruseski.com |
<your Pi IP> |
Forward ports 80 and 443 to your Pi.
git clone https://github.com/benkruseski/CTSDeploy
cd CTSDeploy
sudo bash install.shThis will:
- Create a
ctsdeploysystem user - Install the webhook listener as a systemd service on port 9000
- Configure nginx to proxy
hooks.benkruseski.com→ the listener - Prompt you for a webhook secret
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d hooks.benkruseski.comsudo bash bootstrap_project.sh https://github.com/benkruseski/<repo-name>This clones the repo, reads deploy.yaml, writes the nginx config, and registers the subdomain.
Then add an SSL cert for it:
sudo certbot --nginx -d <project_name>.benkruseski.comAdd this file to the root of any project you want to deploy:
project_name: calendar # becomes calendar.benkruseski.com
port: 8080 # port your Docker container exposes
branch: main # branch that triggers deploysIn each project repo: Settings → Webhooks → Add webhook
| Field | Value |
|---|---|
| Payload URL | https://hooks.benkruseski.com/webhook |
| Content type | application/json |
| Secret | (the secret you set during install.sh) |
| Events | Just the push event |
/opt/ctsdeploy/
projects/
<repo-name>/ ← git clone of each project
deploy.yaml
docker-compose.yml
...
webhook/ ← CTSDeploy listener source
venv/ ← Python virtualenv