-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-fix.sh
More file actions
39 lines (29 loc) Β· 1.18 KB
/
Copy pathdeploy-fix.sh
File metadata and controls
39 lines (29 loc) Β· 1.18 KB
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
#!/bin/bash
# Telegram Bot Vercel Deployment Fix Script
echo "π Starting Telegram Bot Vercel Deployment Fix..."
# 1. Install dependencies
echo "π¦ Installing dependencies..."
npm install
# 2. Generate Prisma client
echo "π§ Generating Prisma client..."
npx prisma generate
# 3. Push database schema
echo "ποΈ Pushing database schema..."
npx prisma db push
# 4. Build the application
echo "ποΈ Building application..."
npm run build
# 5. Deploy to Vercel
echo "π Deploying to Vercel..."
vercel --prod
echo "β
Deployment complete!"
# 6. Test endpoints
echo "π§ͺ Testing endpoints..."
echo "Testing health check..."
curl -s https://obs-telegram.vercel.app/api/bot/health | jq .
echo "Testing bot status..."
curl -s https://obs-telegram.vercel.app/api/bot/setup-manual | jq .
echo "π― Fix complete! Use the following commands to configure your bot:"
echo "1. Configure bot: curl -X POST https://obs-telegram.vercel.app/api/bot/setup-manual -H 'Content-Type: application/json' -d '{\"bot_token\":\"YOUR_BOT_TOKEN\"}'"
echo "2. Check status: curl https://obs-telegram.vercel.app/api/bot/setup-manual"
echo "3. Health check: curl https://obs-telegram.vercel.app/api/bot/health"