-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick-start.sh
More file actions
executable file
Β·53 lines (51 loc) Β· 1.36 KB
/
quick-start.sh
File metadata and controls
executable file
Β·53 lines (51 loc) Β· 1.36 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
#!/bin/bash
echo "π Microsoft Challenge - Quick Start Guide"
echo ""
echo "Available commands:"
echo ""
echo "1. Build the Taxi API:"
echo " mvn clean install -P build-docker -pl taxi-api"
echo ""
echo "2. Start services (Postgres + API):"
echo " docker-compose up"
echo ""
echo "3. Check if API is running:"
echo " curl http://localhost:8080/taxi-api/_healthcheck"
echo ""
echo "4. Populate test data (in another terminal):"
echo " cd testdata && python3 populateDb.py"
echo ""
echo "5. Run API tests:"
echo " cd testdata && python3 testAPI.py"
echo ""
echo "6. View Docker images:"
echo " docker images"
echo ""
echo "7. View running containers:"
echo " docker ps"
echo ""
case "$1" in
"build")
echo "π¨ Building Taxi API..."
mvn clean install -P build-docker -pl taxi-api
;;
"start")
echo "π Starting services..."
docker-compose up
;;
"test")
echo "π§ͺ Running tests..."
cd testdata && python3 testAPI.py
;;
"populate")
echo "π Populating database..."
cd testdata && python3 populateDb.py
;;
"health")
echo "π₯ Checking API health..."
curl -s http://localhost:8080/taxi-api/_healthcheck || echo "β API not responding"
;;
*)
echo "Usage: ./quick-start.sh [build|start|test|populate|health]"
;;
esac