CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
crontech-deploy.sh
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| 3644238 | 1 | #!/bin/bash |
| 2 | set -euo pipefail | |
| 3 | ||
| 4 | # ============================================ | |
| 5 | # Gluecron via Crontech Deployment | |
| 6 | # | |
| 7 | # This deploys gluecron through the Crontech ecosystem. | |
| 8 | # Crontech handles routing, SSL, and domain management. | |
| 9 | # gluecron hosts the code. GateTest scans it. | |
| 10 | # The ecosystem feeds itself. | |
| 11 | # ============================================ | |
| 12 | ||
| 13 | APP_NAME="gluecron" | |
| 14 | ||
| 15 | echo "==========================================" | |
| 16 | echo " Deploying $APP_NAME via Crontech" | |
| 17 | echo "==========================================" | |
| 18 | ||
| 19 | # Check DATABASE_URL | |
| 20 | if [ -z "${DATABASE_URL:-}" ]; then | |
| 21 | echo "ERROR: Set DATABASE_URL first." | |
| 22 | echo " export DATABASE_URL='postgresql://...'" | |
| 23 | exit 1 | |
| 24 | fi | |
| 25 | ||
| 26 | # Run database migration | |
| 27 | echo "Running database migration..." | |
| 28 | if command -v psql &>/dev/null; then | |
| 29 | psql "$DATABASE_URL" -f drizzle/0000_init.sql 2>&1 | tail -5 | |
| 30 | echo "Migration complete." | |
| 31 | else | |
| 32 | echo "psql not found — run drizzle/0000_init.sql manually against your Neon DB." | |
| 33 | echo "You can do this from Neon's web console (SQL Editor)." | |
| 34 | fi | |
| 35 | ||
| 36 | # Install deps if needed | |
| 37 | if [ ! -d "node_modules" ]; then | |
| 38 | echo "Installing dependencies..." | |
| 39 | bun install --production | |
| 40 | fi | |
| 41 | ||
| 42 | # Create repos directory | |
| 43 | mkdir -p "${GIT_REPOS_PATH:-./repos}" | |
| 44 | ||
| 45 | echo "" | |
| 46 | echo "==========================================" | |
| 47 | echo " Ready for Crontech deployment" | |
| 48 | echo "==========================================" | |
| 49 | echo "" | |
| 50 | echo " Start command: bun run src/index.ts" | |
| 51 | echo " Port: ${PORT:-3000}" | |
| 52 | echo " Repos dir: ${GIT_REPOS_PATH:-./repos}" | |
| 53 | echo "" | |
| 54 | echo " Environment variables needed:" | |
| 55 | echo " DATABASE_URL = (your Neon connection string)" | |
| 56 | echo " GIT_REPOS_PATH = /data/repos (or persistent volume)" | |
| 57 | echo " PORT = 3000" | |
| 58 | echo " NODE_ENV = production" | |
| 59 | echo "" | |
| 60 | echo " If Crontech routes via subdomain:" | |
| 61 | echo " gluecron.crontech.ai -> this service" | |
| 62 | echo "" | |
| 63 | echo " If Crontech routes via custom domain:" | |
| 64 | echo " gluecron.com -> this service" | |
| 65 | echo " (Crontech handles SSL + DNS)" | |
| 66 | echo "" |