-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·59 lines (50 loc) · 1.72 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·59 lines (50 loc) · 1.72 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# ATP Volleyball - Quick Setup Script
# This script helps you set up the project for local development
set -e
echo "🏐 ATP Volleyball - Setup Script"
echo "================================="
echo ""
# Check if .env exists in root
if [ ! -f .env ]; then
echo "📝 Creating frontend .env file..."
cp .env.example .env
echo "✅ Created .env - please update VITE_API_URL if needed"
else
echo "✅ Frontend .env already exists"
fi
# Check if backend/.env exists
if [ ! -f backend/.env ]; then
echo "📝 Creating backend .env file..."
cp backend/.env.example backend/.env
echo "⚠️ IMPORTANT: Update backend/.env with your MongoDB credentials!"
echo " - Get MongoDB URI from: https://www.mongodb.com/cloud/atlas"
echo " - Generate admin secret: openssl rand -hex 32"
else
echo "✅ Backend .env already exists"
fi
echo ""
echo "📦 Installing dependencies..."
# Install frontend dependencies
echo " → Installing frontend packages..."
npm install
# Install backend dependencies
if command -v pdm &> /dev/null; then
echo " → Installing backend packages with PDM..."
(cd backend && pdm install)
elif command -v pip &> /dev/null; then
echo " → Installing backend packages with pip..."
pip install -r backend/requirements.txt
else
echo " ⚠️ Neither PDM nor pip found. Please install backend dependencies manually."
fi
echo ""
echo "✅ Setup complete!"
echo ""
echo "📚 Next steps:"
echo " 1. Update backend/.env with your MongoDB Atlas credentials"
echo " 2. Run backend: cd backend && pdm run dev (or: uvicorn app.main:app --reload)"
echo " 3. Run frontend: npm run dev"
echo ""
echo "📖 Full deployment guide: See deployment/RENDER-DEPLOYMENT.md"
echo ""