Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

DEPLOY.md

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

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