Spaces:
Sleeping

File size: 1,546 Bytes
cd61bf7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
# Pre-deployment checklist

echo "πŸ” Checking deployment readiness..."
echo ""

# Check if git initialized
if [ ! -d ".git" ]; then
    echo "❌ Git not initialized. Run: git init"
    exit 1
fi
echo "βœ… Git initialized"

# Check critical files exist
files=(
    "backend/railway.json"
    "backend/Procfile"
    "backend/.env.railway.template"
    "frontend/vercel.json"
    "frontend/.env.vercel.template"
    "DEPLOYMENT.md"
)

for file in "${files[@]}"; do
    if [ ! -f "$file" ]; then
        echo "❌ Missing: $file"
        exit 1
    fi
done
echo "βœ… All deployment configs present"

# Check .gitignore
if [ ! -f ".gitignore" ]; then
    echo "❌ Missing .gitignore"
    exit 1
fi
echo "βœ… .gitignore exists"

# Check if .env files are gitignored
if git check-ignore backend/.env >/dev/null 2>&1; then
    echo "βœ… .env files properly ignored"
else
    echo "⚠️  WARNING: .env files not ignored! Add to .gitignore"
fi

# Check backend dependencies
if [ ! -f "backend/requirements.txt" ]; then
    echo "❌ Missing backend/requirements.txt"
    exit 1
fi
echo "βœ… Backend dependencies defined"

# Check frontend dependencies
if [ ! -f "frontend/package.json" ]; then
    echo "❌ Missing frontend/package.json"
    exit 1
fi
echo "βœ… Frontend dependencies defined"

echo ""
echo "πŸŽ‰ Ready for deployment!"
echo ""
echo "Next steps:"
echo "1. Push to GitHub: git push origin main"
echo "2. Deploy backend to Railway"
echo "3. Deploy frontend to Vercel"
echo "4. Read DEPLOYMENT.md for detailed instructions"