-
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
/
setup.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 ""