-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-start.sh
More file actions
executable file
Β·52 lines (45 loc) Β· 1.68 KB
/
docker-start.sh
File metadata and controls
executable file
Β·52 lines (45 loc) Β· 1.68 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
#!/bin/bash
# GymApp Docker Startup Script
echo "ποΈ Starting GymApp Backend Services..."
# Check if .env file exists
if [ ! -f .env ]; then
echo "β οΈ .env file not found. Creating from template..."
cp .env.example .env
echo "π Please edit .env file with your API keys and configuration"
echo " Required: OPENAI_API_KEY"
echo ""
read -p "Press Enter to continue after editing .env file..."
fi
# Check if Firebase service account file exists
if [ ! -f "spring-api/src/main/resources/firebase-service-account.json" ]; then
echo "β οΈ Firebase service account file not found!"
echo " Please place your firebase-service-account.json file in:"
echo " spring-api/src/main/resources/firebase-service-account.json"
echo ""
read -p "Press Enter to continue after adding the file..."
fi
# Build and start services
echo "π¨ Building and starting services..."
docker-compose down --remove-orphans
docker-compose build --no-cache
docker-compose up -d
# Show status
echo ""
echo "π Service Status:"
docker-compose ps
echo ""
echo "π GymApp Backend Services Started!"
echo ""
echo "π‘ Available Services:"
echo " π€ AI Analysis API: http://localhost:8000"
echo " π Spring Boot API: http://localhost:8080"
echo ""
echo "π Health Checks:"
echo " π€ AI Backend: http://localhost:8000/health"
echo " π Spring API: http://localhost:8080/actuator/health"
echo ""
echo "π Useful Commands:"
echo " π View logs: docker-compose logs -f"
echo " π Stop services: docker-compose down"
echo " π Restart: docker-compose restart"
echo " π§Ή Clean up: docker-compose down -v --remove-orphans"