mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 14:23:08 +00:00
fix(restart): include n8n workers compose file in make restart
This commit is contained in:
2
Makefile
2
Makefile
@@ -54,7 +54,7 @@ monitor:
|
||||
docker stats
|
||||
|
||||
restart:
|
||||
docker compose -p $(PROJECT_NAME) down && docker compose -p $(PROJECT_NAME) up -d
|
||||
bash ./scripts/restart.sh
|
||||
|
||||
show-restarts:
|
||||
@docker ps -q | while read id; do \
|
||||
|
||||
43
scripts/restart.sh
Executable file
43
scripts/restart.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
# =============================================================================
|
||||
# restart.sh - Restart all services
|
||||
# =============================================================================
|
||||
# Restarts all Docker Compose services including dynamically generated
|
||||
# worker/runner compose files.
|
||||
#
|
||||
# Handles compose files:
|
||||
# - docker-compose.yml (main)
|
||||
# - docker-compose.n8n-workers.yml (if exists)
|
||||
#
|
||||
# Usage: bash scripts/restart.sh
|
||||
# =============================================================================
|
||||
|
||||
set -e
|
||||
|
||||
# Source the utilities file and initialize paths
|
||||
source "$(dirname "$0")/utils.sh"
|
||||
init_paths
|
||||
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
PROJECT_NAME="localai"
|
||||
|
||||
# Build compose files array
|
||||
COMPOSE_FILES=("-f" "docker-compose.yml")
|
||||
|
||||
# Add n8n workers compose file if exists
|
||||
N8N_WORKERS_COMPOSE="docker-compose.n8n-workers.yml"
|
||||
if [ -f "$N8N_WORKERS_COMPOSE" ]; then
|
||||
COMPOSE_FILES+=("-f" "$N8N_WORKERS_COMPOSE")
|
||||
fi
|
||||
|
||||
log_info "Restarting services..."
|
||||
log_info "Using compose files: ${COMPOSE_FILES[*]}"
|
||||
|
||||
# Stop all services
|
||||
docker compose -p "$PROJECT_NAME" "${COMPOSE_FILES[@]}" down
|
||||
|
||||
# Start all services
|
||||
docker compose -p "$PROJECT_NAME" "${COMPOSE_FILES[@]}" up -d
|
||||
|
||||
log_success "Services restarted successfully!"
|
||||
Reference in New Issue
Block a user