-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
56 lines (47 loc) · 1.28 KB
/
setup.sh
File metadata and controls
56 lines (47 loc) · 1.28 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
#!/bin/bash
echo "Vantage Setup Script"
echo "===================="
echo ""
# Check if .env exists
if [ ! -f .env ]; then
echo "Creating .env file from template..."
cp .env.example .env
echo "IMPORTANT: Edit .env and add your API keys!"
echo ""
else
echo ".env file already exists"
fi
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "Docker is not running. Please start Docker Desktop."
exit 1
fi
echo "Docker is running"
echo ""
# Start Docker services
echo "Starting PostgreSQL and Redis..."
npm run docker:up
# Wait for services to be ready
echo "Waiting for services to start..."
sleep 5
# Generate Prisma client
echo "Generating Prisma client..."
npm run db:generate
# Push database schema
echo "Pushing database schema..."
npm run db:push
echo ""
echo "Setup complete!"
echo ""
echo "Next steps:"
echo "1. Edit .env and add your API keys"
echo "2. Run 'npm run dev' to start development servers"
echo "3. Open http://localhost:3000 in your browser"
echo ""
echo "Useful commands:"
echo " npm run dev - Start frontend & backend"
echo " npm run dev:web - Start only frontend"
echo " npm run dev:api - Start only backend"
echo " npm run worker - Start background worker"
echo " npm run db:studio - Open Prisma Studio"
echo ""