🔧 Fix All Docker Compose Commands
✅ Updated All Docker Compose References: - package.json: docker:compose and docker:down scripts - scripts/deploy.sh: All compose commands and checks - scripts/monitor.sh: All compose commands - DEPLOYMENT.md: Documentation examples - .github/workflows/ci-cd.yml: CI/CD pipeline �� Benefits: - Compatible with newer Docker versions (docker compose) - No more 'command not found' errors - Consistent syntax across all files - Successful deployment and monitoring 📝 Changed: - 'docker-compose' → 'docker compose' (new syntax) - Updated command availability checks - Fixed all script references
This commit is contained in:
@@ -49,7 +49,7 @@ check_health() {
|
||||
# Show container status
|
||||
show_status() {
|
||||
log "Container status:"
|
||||
docker-compose -f $COMPOSE_FILE ps
|
||||
docker compose -f $COMPOSE_FILE ps
|
||||
|
||||
echo ""
|
||||
log "Resource usage:"
|
||||
@@ -57,7 +57,7 @@ show_status() {
|
||||
|
||||
echo ""
|
||||
log "Container logs (last 20 lines):"
|
||||
docker-compose -f $COMPOSE_FILE logs --tail=20
|
||||
docker compose -f $COMPOSE_FILE logs --tail=20
|
||||
}
|
||||
|
||||
# Show detailed metrics
|
||||
@@ -92,7 +92,7 @@ show_metrics() {
|
||||
# Restart container
|
||||
restart_container() {
|
||||
log "Restarting container..."
|
||||
docker-compose -f $COMPOSE_FILE restart
|
||||
docker compose -f $COMPOSE_FILE restart
|
||||
|
||||
# Wait for health check
|
||||
log "Waiting for container to be healthy..."
|
||||
@@ -110,7 +110,7 @@ restart_container() {
|
||||
show_logs() {
|
||||
local lines=${1:-50}
|
||||
log "Showing last $lines lines of logs:"
|
||||
docker-compose -f $COMPOSE_FILE logs --tail=$lines -f
|
||||
docker compose -f $COMPOSE_FILE logs --tail=$lines -f
|
||||
}
|
||||
|
||||
# Cleanup
|
||||
|
||||
Reference in New Issue
Block a user