Final changes have been made need to update Readme

This commit is contained in:
RedsAnalysis 2025-03-15 07:23:16 -04:00
parent 34b77380c2
commit 13a79662f4
2 changed files with 16 additions and 14 deletions

View File

@ -17,7 +17,7 @@ else
exit 1 exit 1
fi fi
# Step 2: Start the container without mounting the venv volume # Step 2: Start the container without mounting the volumes (venv, custom_nodes)
echo "Starting the container..." echo "Starting the container..."
COMPOSE_BAKE=true docker-compose up -d COMPOSE_BAKE=true docker-compose up -d
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@ -36,14 +36,14 @@ LOGS_PID=$! # Save the PID of the background process
# Wait for the container logs to indicate it's ready (looking for the custom message) # Wait for the container logs to indicate it's ready (looking for the custom message)
echo "Waiting for the container to be fully started..." echo "Waiting for the container to be fully started..."
while ! docker logs "$container_name" 2>&1 | grep -q "To see the GUI go to: http://0.0.0.0:8188"; do while ! docker logs "$container_name" 2>&1 | grep -q "To see the GUI go to: http://0.0.0.0:8188"; do
sleep 20 sleep 10
done done
# Stop streaming logs (kill the background process) # Stop streaming logs (kill the background process)
kill $LOGS_PID kill $LOGS_PID
echo "Container is fully started." echo "Container is fully started."
# Step 4: Copy the 'venv' directory from the container to the host # Step 4.1: Copy the 'venv' directory from the container to the host
echo "Checking if /app/venv exists in the container..." echo "Checking if /app/venv exists in the container..."
if docker exec "$container_name" ls /app/venv; then if docker exec "$container_name" ls /app/venv; then
echo "Copying the virtual environment from the container to the host..." echo "Copying the virtual environment from the container to the host..."
@ -58,7 +58,7 @@ else
exit 1 exit 1
fi fi
# Step 4: Copy the 'ComfyUI-Manager' directory from the container to the host # Step 4.2: Copy the 'ComfyUI-Manager' directory from the container to the host
echo "Checking if /app/comfyui/custom_nodes/ComfyUI-Manager exists in the container..." echo "Checking if /app/comfyui/custom_nodes/ComfyUI-Manager exists in the container..."
if docker exec "$container_name" ls /app/comfyui/custom_nodes/ComfyUI-Manager; then if docker exec "$container_name" ls /app/comfyui/custom_nodes/ComfyUI-Manager; then
echo "Copying the ComfyUI-Manager from the container to the host..." echo "Copying the ComfyUI-Manager from the container to the host..."
@ -83,7 +83,7 @@ else
exit 1 exit 1
fi fi
# Step 6: Update the Docker Compose file to mount the venv volume # Step 6.1: Update the Docker Compose file to mount the venv volume
echo "Updating Docker Compose file to mount the virtual environment..." echo "Updating Docker Compose file to mount the virtual environment..."
sed -i '/# Mount the venv directory for persistence/a \ \ \ \ \ \ - ./venv:/app/venv' docker-compose.yml sed -i '/# Mount the venv directory for persistence/a \ \ \ \ \ \ - ./venv:/app/venv' docker-compose.yml
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@ -93,7 +93,7 @@ else
exit 1 exit 1
fi fi
# Step 6: Update the Docker Compose file to mount the venv volume # Step 6.2: Update the Docker Compose file to mount the venv volume
echo "Updating Docker Compose file to mount the custom_nodes..." echo "Updating Docker Compose file to mount the custom_nodes..."
sed -i '/# Mount the custom nodes directory directly inside/a \ \ \ \ \ \ - ./custom_nodes:/app/comfyui/custom_nodes' docker-compose.yml sed -i '/# Mount the custom nodes directory directly inside/a \ \ \ \ \ \ - ./custom_nodes:/app/comfyui/custom_nodes' docker-compose.yml
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@ -103,4 +103,6 @@ else
exit 1 exit 1
fi fi
echo "Setup complete! you can use "docker-compose up" to start the container." echo "======================================== SETUP COMPLETE ========================================"
echo "use 'docker-compose up' to start the container and 'docker-compose down' to stop the container."
echo "================================================================================================"

View File

@ -8,15 +8,15 @@ services:
ports: ports:
- "8188:8188" # Expose the backend API or server - "8188:8188" # Expose the backend API or server
volumes: volumes:
- ./input:/app/comfyui/input # Mount the input directory directly inside /app/comfyui - ./input:/app/comfyui/input # Volume for input files
- ./models:/app/comfyui/models # Mount the models directory directly inside /app/comfyui - ./models:/app/comfyui/models # Volume for models
- ./output:/app/comfyui/output # Mount the output directory directly inside /app/comfyui - ./output:/app/comfyui/output # Volume for output files
- ./user:/app/comfyui/user # Comment this line and uncomment the next line if you want to have a workflows directory in the root directory. - ./user:/app/comfyui/user # Volume for user settings, Also this is where your workflows are stored
#- ./workflows:/app/comfyui/user/default/workflows #- ./workflows:/app/comfyui/user/default/workflows # Uncomment if you to make a workflow directory in the comfyui directory
# Mount the venv directory for persistence (automatically mounted with you run docker-build.sh) # Mount the venv directory for persistence (automatically mounted with you run docker-build.sh) #Don't change this
# Mount the custom nodes directory directly inside /app/comfyui (automatically mounted with you run docker-build.sh) # Mount the custom nodes directory directly inside /app/comfyui (automatically mounted with you run docker-build.sh) #Don't change this
environment: environment: