-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-database.sh
More file actions
34 lines (23 loc) · 809 Bytes
/
fix-database.sh
File metadata and controls
34 lines (23 loc) · 809 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
#!/bin/bash
set -e
# Source common configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/common.sh"
fix_database_connection() {
log "Fixing database connection issue..."
check_work_dir
log "Stopping containers..."
docker-compose down || error_exit "Failed to stop containers"
log "Starting containers with proper dependency order..."
docker-compose up -d || error_exit "Failed to start containers"
log "Containers started - Docker Compose handles the dependency order!"
log "Checking final status..."
docker-compose ps
log "Database connection fix completed!"
}
main() {
log "Starting database connection fix..."
fix_database_connection
log "Fix completed successfully!"
}
main "$@"