Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesPull RequestsActionsSecurityInsightsSettings
✨ AI
More
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.mdBlame139 lines · 1 contributor
8ade77bClaude1# Deploying Gluecron to Production
2
3## Prerequisites
4
51. A server (Hetzner, DigitalOcean, etc.) with Ubuntu 22.04+
62. A Neon PostgreSQL database (free tier: https://neon.tech)
73. Domain pointed to the server (gluecron.com → server IP)
8
9## Quick Deploy (one command)
10
11```bash
12# 1. SSH into your server
13ssh root@your-server-ip
14
15# 2. Set your database URL
16export DATABASE_URL="postgresql://user:pass@host/gluecron?sslmode=require"
17
18# 3. Run the deploy script
19curl -fsSL https://raw.githubusercontent.com/ccantynz-alt/Gluecron.com/claude/ship-fixes-and-tests-Jvz1c/scripts/deploy.sh | bash
20```
21
22## Manual Deploy
23
24### Step 1: Database
25
261. Go to https://neon.tech and create a project called "gluecron"
272. Copy the connection string
283. Run the migration:
29```bash
30psql "your-connection-string" -f drizzle/0000_init.sql
31```
32
33### Step 2: Server Setup
34
35```bash
36# Install Bun
37curl -fsSL https://bun.sh/install | bash
38
39# Install git
40apt-get update && apt-get install -y git
41
42# Clone the repo
43git clone --branch claude/ship-fixes-and-tests-Jvz1c \
44 https://github.com/ccantynz-alt/Gluecron.com.git /opt/gluecron
45cd /opt/gluecron
46
47# Create .env
48cat > .env << EOF
49DATABASE_URL=postgresql://user:pass@host/gluecron?sslmode=require
50GIT_REPOS_PATH=/data/repos
51PORT=3000
52NODE_ENV=production
53GATETEST_URL=https://gatetest.ai/api/scan/run
54CRONTECH_DEPLOY_URL=https://crontech.ai/api/trpc/tenant.deploy
55EOF
56
57# Install dependencies
58bun install --production
59
60# Create repos directory
61mkdir -p /data/repos
62
63# Start the server
64bun run src/index.ts
65```
66
67### Step 3: HTTPS with Nginx
68
69```bash
70bash scripts/setup-nginx.sh gluecron.com
71```
72
73### Step 4: Systemd (keep it running)
74
75```bash
76# The deploy script creates this, but manually:
77cat > /etc/systemd/system/gluecron.service << EOF
78[Unit]
79Description=Gluecron
80After=network.target
81
82[Service]
83Type=simple
84WorkingDirectory=/opt/gluecron
85EnvironmentFile=/opt/gluecron/.env
86ExecStart=/root/.bun/bin/bun run src/index.ts
87Restart=always
88RestartSec=5
89
90[Install]
91WantedBy=multi-user.target
92EOF
93
94systemctl daemon-reload
95systemctl enable gluecron
96systemctl start gluecron
97```
98
99## Docker Deploy
100
101```bash
102# Create .env file with DATABASE_URL
103echo "DATABASE_URL=postgresql://..." > .env
104
105# Build and run
106docker compose up -d
107
108# Run migration
109docker compose exec gluecron bun run -e "..."
110# Or connect directly to Neon and run drizzle/0000_init.sql
111```
112
113## Operations
114
115```bash
116# View logs
117journalctl -u gluecron -f
118
119# Restart
120systemctl restart gluecron
121
122# Update to latest
123cd /opt/gluecron
124git pull origin claude/ship-fixes-and-tests-Jvz1c
125bun install
126systemctl restart gluecron
127```
128
129## Verification Checklist
130
131After deploy, verify:
132
133- [ ] `curl http://localhost:3000` returns the landing page
134- [ ] Register an account at /register
135- [ ] Create a repo at /new
136- [ ] `git clone http://gluecron.com/youruser/yourrepo.git` works
137- [ ] Push code and see it in the web UI
138- [ ] Health dashboard shows at /youruser/yourrepo/health
139- [ ] HTTPS works (if nginx + certbot set up)