forked from VGabriel45/SolidityVisualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-services.sh
More file actions
executable file
Β·36 lines (29 loc) Β· 942 Bytes
/
start-services.sh
File metadata and controls
executable file
Β·36 lines (29 loc) Β· 942 Bytes
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
#!/bin/bash
echo "π Starting Solidity Visualizer services..."
# Check if docker is running
if ! docker info > /dev/null 2>&1; then
echo "β Docker is not running. Please start Docker first."
exit 1
fi
# Start database
echo "π¦ Starting database..."
chmod +x start-database.sh
./start-database.sh
# Start server
echo "π₯οΈ Starting server..."
docker compose up --build -d
# Wait for services to be ready
echo "β³ Waiting for services to be ready..."
sleep 5
# Initialize database schema
echo "ποΈ Initializing database schema..."
pnpm db:push
# Check if services are running
if docker compose ps | grep -q "Up"; then
echo "β
Server is running!"
echo "π Server is available at http://localhost:8000"
echo "ποΈ Database is available at localhost:5432"
echo "β
Database schema initialized!"
else
echo "β Something went wrong. Please check docker logs with: docker compose logs"
fi