Part of BlackRoad OS β Sovereign Computing for Everyone
road deploy is part of the BlackRoad OS ecosystem β a sovereign, distributed operating system built on edge computing, local AI, and mesh networking by BlackRoad OS, Inc.
| Org | Focus |
|---|---|
| BlackRoad OS | Core platform |
| BlackRoad OS, Inc. | Corporate |
| BlackRoad AI | AI/ML |
| BlackRoad Hardware | Edge hardware |
| BlackRoad Security | Cybersecurity |
| BlackRoad Quantum | Quantum computing |
| BlackRoad Agents | AI agents |
| BlackRoad Network | Mesh networking |
Website: blackroad.io | Chat: chat.blackroad.io | Search: search.blackroad.io
!!!!!!!!!!!!!!!!!!!!!! WE ARE MOVING AWAY FROM CLOUDFLARE FOR DEPLOYMENTS !!!!!!!!!!!!!!!!!!!!!!
Git-based deployment engine for BlackRoad Pi cluster. Automatically clones, builds, and deploys websites from GitHub to the aria Pi with nginx configuration and SSL certificates.
Node.js deployment engine that automates the entire deployment pipeline from GitHub push to live website. Supports multiple build systems, automatic SSL via Let's Encrypt, and GitHub webhook integration.
- β Git-Based Deployments - Clone from GitHub, GitLab, Bitbucket
- β Automatic Builds - npm, yarn, Go, Python, static sites
- β nginx Configuration - Auto-generates reverse proxy configs
- β Let's Encrypt SSL - Automatic HTTPS certificate generation
- β GitHub Webhooks - Deploy on push automatically
- β Rollback Support - Keep deployment history
- β Zero Downtime - Atomic deployments with health checks
Status: Built and ready for deployment to alice Pi
Target Environment:
- Host: alice (192.168.4.49)
- Port: 9001
- Target Server: aria (192.168.4.82)
- Deploy Directory:
/var/www/sites/
GitHub Push β Webhook β road-deploy (alice:9001)
β
1. Clone repo
2. Install dependencies
3. Run build command
4. rsync to aria Pi
5. Configure nginx
6. Generate SSL cert
7. Reload nginx
β
β
Website LIVE!
GET /healthPOST /api/deploy
{
"domain": "example.com",
"repo_url": "https://github.com/user/repo",
"branch": "main",
"build_command": "npm run build",
"deploy_path": "dist"
}GET /api/deploymentsGET /api/deployments/:idPOST /api/deployments/:id/rollbackPOST /webhook/github
# Configure in GitHub repo settings:
# Payload URL: http://alice:9001/webhook/github
# Content type: application/json
# Events: push- Node.js 18+
- SSH access to aria Pi (passwordless)
- nginx installed on aria
- certbot installed on aria (for SSL)
# 1. Clone repo
git clone https://github.com/BlackRoad-OS/road-deploy.git
cd road-deploy
# 2. Install dependencies
npm install
# 3. Configure environment
cat > .env << EOF
PORT=9001
DEPLOY_BASE_DIR=/var/deployments
TARGET_HOST=pi@aria
TARGET_DEPLOY_DIR=/var/www/sites
NGINX_SITES_DIR=/etc/nginx/sites-available
NGINX_ENABLED_DIR=/etc/nginx/sites-enabled
EOF
# 4. Create deployment directories
mkdir -p /var/deployments
ssh pi@aria 'sudo mkdir -p /var/www/sites'
# 5. Setup SSH keys (passwordless to aria)
ssh-copy-id pi@aria
# 6. Start server
npm start# 1. Copy files to alice
scp -r ~/road-deploy pi@alice:~/
# 2. SSH into alice
ssh pi@alice
# 3. Install dependencies
cd ~/road-deploy
npm install
# 4. Setup SSH to aria
ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519
ssh-copy-id pi@aria
# 5. Create deployment directory
mkdir -p /var/deployments
# 6. Install PM2
sudo npm install -g pm2
# 7. Start with PM2
pm2 start server.js --name road-deploy
pm2 save
pm2 startupcurl -X POST http://alice:9001/api/deploy \
-H "Content-Type: application/json" \
-d '{
"domain": "blackroad.io",
"repo_url": "https://github.com/BlackRoad-OS/blackroad-os-landing",
"branch": "main",
"build_command": "echo \"Static site - no build needed\"",
"deploy_path": "."
}'curl -X POST http://alice:9001/api/deploy \
-H "Content-Type: application/json" \
-d '{
"domain": "app.blackroad.io",
"repo_url": "https://github.com/BlackRoad-OS/blackroad-app",
"branch": "main",
"build_command": "npm install && npm run build",
"deploy_path": "build"
}'curl -X POST http://alice:9001/api/deploy \
-H "Content-Type: application/json" \
-d '{
"domain": "docs.blackroad.io",
"repo_url": "https://github.com/BlackRoad-OS/docs",
"branch": "main",
"build_command": "npm install && npm run build",
"deploy_path": ".next"
}'# List all deployments
curl http://alice:9001/api/deployments
# Get specific deployment
curl http://alice:9001/api/deployments/abc-123-defGo to: Settings > Webhooks > Add webhook
Payload URL: http://alice:9001/webhook/github
Content type: application/json
Secret: (optional - set in .env as WEBHOOK_SECRET)
Events: Just the push event
Active: β
Create .road-deploy.json in your repo root:
{
"domain": "example.com",
"build_command": "npm run build",
"deploy_path": "dist",
"ssl": true,
"health_check": "/"
}git push origin main
# Deployment triggered automatically! π- server.js - Express deployment engine (300+ lines)
- package.json - Node.js dependencies
- .env - Environment configuration
- README.md - This file
npm install && npm run buildyarn install && yarn buildgo build -o app main.gopip install -r requirements.txt && python build.pyecho "No build needed"The deployment engine automatically generates nginx configs:
server {
listen 80;
server_name example.com www.example.com;
root /var/www/sites/example.com;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
# Automatic SSL redirect after certbot
# listen 443 ssl;
# ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
}# Deployment engine runs:
sudo certbot --nginx -d example.com -d www.example.com --non-interactive --agree-tos -m admin@blackroad.io
# Result: HTTPS automatically configured! πssh pi@aria
sudo certbot --nginx -d example.com
sudo nginx -s reloadcurl http://alice:9001/healthpm2 status
pm2 logs road-deploy
pm2 monit# View deployment history
curl http://alice:9001/api/deployments | jq
# Watch live deployment
pm2 logs road-deploy --lines 50If deployment fails health check, automatically rolls back to previous version.
curl -X POST http://alice:9001/api/deployments/abc-123/rollbackDeploys to new directory, health checks, then atomically switches symlinks.
Support for staging/production branches:
{
"branches": {
"main": "production",
"staging": "staging"
}
}Run custom scripts before/after deployment:
{
"hooks": {
"pre_deploy": "./scripts/backup-db.sh",
"post_deploy": "./scripts/notify-slack.sh"
}
}- Ensures DNS records point to aria (192.168.4.82)
- Automatic subdomain configuration
- Reports deployment status to API
- Tracks deployment history in database
- Trigger deployments from web interface
- View deployment logs and history
Part of the BlackRoad Domain Registry ecosystem:
GitHub β [road-dns-deploy] β [road-registry-api] β [road-deploy] β [road-control]
PowerDNS API Server This Engine Web UI
Workflow:
- Push code to GitHub
- Webhook triggers road-deploy
- Clone, build, deploy to aria
- Configure nginx + SSL
- Update road-registry-api status
- Website live! π
Total independence. Total control. Total sovereignty.
- road-dns-deploy - PowerDNS deployment
- road-registry-api - Domain management API
- road-control - Web control panel
- Email: blackroad.systems@gmail.com
- GitHub Issues: BlackRoad-OS/road-deploy/issues
Built with π€ by BlackRoad OS, Inc.