-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
Β·43 lines (35 loc) Β· 1.3 KB
/
Copy pathdeploy.sh
File metadata and controls
executable file
Β·43 lines (35 loc) Β· 1.3 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
#!/bin/bash
# Avalanche Forecast Deployment Script
echo "ποΈ Avalanche Forecast Deployment Script"
echo "========================================"
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "β Docker is not installed. Please install Docker first."
exit 1
fi
# Check if Docker Compose is installed
if ! command -v docker-compose &> /dev/null; then
echo "β Docker Compose is not installed. Please install Docker Compose first."
exit 1
fi
echo "β
Docker and Docker Compose are installed"
# Build and start the application
echo "π Building and starting the application..."
docker-compose up --build -d
# Wait for the application to start
echo "β³ Waiting for the application to start..."
sleep 10
# Check if the application is running
if curl -f http://localhost:5000/api/data > /dev/null 2>&1; then
echo "β
Application is running successfully!"
echo "π Access the application at: http://localhost:5000"
echo "π API endpoint: http://localhost:5000/api/data"
else
echo "β Application failed to start. Check the logs with: docker-compose logs"
exit 1
fi
echo ""
echo "π Deployment complete!"
echo "π To view logs: docker-compose logs -f"
echo "π To stop: docker-compose down"
echo "π To restart: docker-compose restart"