CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | # Deploying Gluecron to Production
## The Green Ecosystem
Gluecron is part of the self-hosting ecosystem:
- **Crontech** deploys gluecron (and everything else)
- **Gluecron** hosts the code for Crontech, GateTest, and itself
- **GateTest** scans every push to gluecron
Once live, all three services feed each other. Dog food all the way.
## Option A: Deploy via Crontech (recommended)
Since Crontech handles deployment, routing, and SSL:
```bash
# 1. Create Neon database at neon.tech (2 minutes)
# Copy the connection string
# 2. In Crontech, deploy gluecron as a service with:
# - Repo: ccantynz-alt/Gluecron.com
# - Branch: claude/ship-fixes-and-tests-Jvz1c
# - Build: bun install --production
# - Start: bun run src/index.ts
# - Port: 3000
#
# Environment variables:
# DATABASE_URL = postgresql://your-neon-url
# GIT_REPOS_PATH = /data/repos
# PORT = 3000
# NODE_ENV = production
#
# Persistent volume: mount /data/repos (for git repos on disk)
# 3. Run the migration (one time):
# Paste drizzle/0000_init.sql into Neon's SQL Editor and run it
# 4. Route gluecron.com (or gluecron.crontech.ai) to the service
```
### Crontech routing options:
- **Subdomain:** `gluecron.crontech.ai` → fastest to set up
- **Custom domain:** `gluecron.com` → add CNAME to Crontech in DNS
## Option B: Direct Deploy (any Linux server)
```bash
# 1. SSH into your server
ssh root@your-server-ip
# 2. Set your database URL
export DATABASE_URL="postgresql://user:pass@host/gluecron?sslmode=require"
# 3. Run the deploy script
curl -fsSL https://raw.githubusercontent.com/ccantynz-alt/Gluecron.com/claude/ship-fixes-and-tests-Jvz1c/scripts/deploy.sh | bash
```
## Manual Deploy
### Step 1: Database
1. Go to https://neon.tech and create a project called "gluecron"
2. Copy the connection string
3. Run the migration:
```bash
psql "your-connection-string" -f drizzle/0000_init.sql
```
### Step 2: Server Setup
```bash
# Install Bun
curl -fsSL https://bun.sh/install | bash
# Install git
apt-get update && apt-get install -y git
# Clone the repo
git clone --branch claude/ship-fixes-and-tests-Jvz1c \
https://github.com/ccantynz-alt/Gluecron.com.git /opt/gluecron
cd /opt/gluecron
# Create .env
cat > .env << EOF
DATABASE_URL=postgresql://user:pass@host/gluecron?sslmode=require
GIT_REPOS_PATH=/data/repos
PORT=3000
NODE_ENV=production
GATETEST_URL=https://gatetest.ai/api/scan/run
CRONTECH_DEPLOY_URL=https://crontech.ai/api/trpc/tenant.deploy
EOF
# Install dependencies
bun install --production
# Create repos directory
mkdir -p /data/repos
# Start the server
bun run src/index.ts
```
### Step 3: HTTPS with Nginx
```bash
bash scripts/setup-nginx.sh gluecron.com
```
### Step 4: Systemd (keep it running)
```bash
# The deploy script creates this, but manually:
cat > /etc/systemd/system/gluecron.service << EOF
[Unit]
Description=Gluecron
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/gluecron
EnvironmentFile=/opt/gluecron/.env
ExecStart=/root/.bun/bin/bun run src/index.ts
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable gluecron
systemctl start gluecron
```
## Docker Deploy
```bash
# Create .env file with DATABASE_URL
echo "DATABASE_URL=postgresql://..." > .env
# Build and run
docker compose up -d
# Run migration
docker compose exec gluecron bun run -e "..."
# Or connect directly to Neon and run drizzle/0000_init.sql
```
## Operations
```bash
# View logs
journalctl -u gluecron -f
# Restart
systemctl restart gluecron
# Update to latest
cd /opt/gluecron
git pull origin claude/ship-fixes-and-tests-Jvz1c
bun install
systemctl restart gluecron
```
## Verification Checklist
After deploy, verify:
- [ ] `curl http://localhost:3000` returns the landing page
- [ ] Register an account at /register
- [ ] Create a repo at /new
- [ ] `git clone http://gluecron.com/youruser/yourrepo.git` works
- [ ] Push code and see it in the web UI
- [ ] Health dashboard shows at /youruser/yourrepo/health
- [ ] HTTPS works (if nginx + certbot set up)
|