-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·37 lines (28 loc) · 860 Bytes
/
Copy pathdeploy.sh
File metadata and controls
executable file
·37 lines (28 loc) · 860 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
37
#!/bin/bash
set -e
echo "🚀 Starting SmartCommerce AI Deployment..."
# Configuration
ENVIRONMENT="${1:-development}"
# Build and deploy
if [ "$ENVIRONMENT" = "production" ]; then
echo "🚢 Deploying to production..."
docker-compose -f docker-compose.prod.yml up -d --build
elif [ "$ENVIRONMENT" = "staging" ]; then
echo "🧪 Deploying to staging..."
docker-compose -f docker-compose.yml up -d --build
else
echo "🛠️ Deploying to development..."
docker-compose up -d --build
fi
# Health checks
echo "🩺 Performing health checks..."
sleep 30
if curl -f http://localhost/health; then
echo "✅ Application is healthy!"
else
echo "❌ Health check failed!"
exit 1
fi
echo "🎉 Deployment completed successfully!"
echo "🌐 Application: http://localhost"
echo "📊 Monitoring: http://localhost:3001"