-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick-fix.sh
More file actions
58 lines (46 loc) · 1.4 KB
/
quick-fix.sh
File metadata and controls
58 lines (46 loc) · 1.4 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
54
55
56
57
58
#!/bin/bash
# Quick Fix and Deploy - Payment Service
# This script applies all fixes and redeploys the service
echo "?? Applying fixes and redeploying Payment Service..."
echo ""
# Stop existing containers
echo "1/6 Stopping containers..."
docker-compose down
# Remove old volume to fix permission issues
echo "2/6 Removing old DataProtection volume..."
docker volume rm payment-dataprotection 2>/dev/null || true
# Build with no cache
echo "3/6 Building image..."
docker-compose build --no-cache
# Start services
echo "4/6 Starting services..."
docker-compose up -d
# Wait for services
echo "5/6 Waiting for health checks (40 seconds)..."
sleep 40
# Check status
echo "6/6 Checking status..."
docker-compose ps
echo ""
# Test endpoints
echo "Testing endpoints..."
echo ""
# Local health
if curl -s -f http://localhost:4005/health > /dev/null 2>&1; then
echo "? Local health: http://localhost:4005/health"
else
echo "? Local health check failed"
fi
# Local swagger
if curl -s -f http://localhost:4005/swagger/v1/swagger.json > /dev/null 2>&1; then
echo "? Local Swagger: http://localhost:4005/swagger/index.html"
else
echo "? Local Swagger failed"
fi
echo ""
echo "?? Deployment complete!"
echo ""
echo "Check logs: docker-compose logs -f payment"
echo "Check Swagger: http://localhost:4005/swagger/index.html"
echo "Check via Traefik: https://parvazorg.minisource.ir/api/payment/swagger/index.html"
echo ""