Commit Graph

18 Commits

Author SHA1 Message Date
Yury Kossakovsky
f5aa8a5ddf Refactor service management in start_services.py and scripts
- Updated the is_supabase_enabled function to read COMPOSE_PROFILES from the .env file instead of os.environ, improving clarity.
- Simplified the run_command function by removing the unused env parameter.
- Refined the stop_existing_containers function to streamline the shutdown process for the 'localai' project, conditionally including the Supabase compose file.
- Enhanced logging for better user feedback during service management operations.
- Adjusted the scripts for generating secrets and applying updates to improve clarity and functionality.
2025-05-22 14:09:28 -06:00
Yury Kossakovsky
5351443f76 Refactor Supabase compose file handling in start_services.py
- Updated the stop_existing_containers function to conditionally include the Supabase compose file only if Supabase is enabled, improving clarity and functionality.
- Added logging to inform users about the presence or absence of the Supabase compose file, enhancing the shutdown process.
- Included checks for the existence of the Supabase compose file to provide context when Supabase is disabled, ensuring better user feedback.
2025-05-22 13:46:02 -06:00
Yury Kossakovsky
0c24dd07f8 Add force stop functionality for lingering containers in start_services.py
- Introduced a new function, force_stop_lingering_containers, to identify and force stop containers that may be running outside of the current Docker Compose management.
- Implemented logic to check for specific container patterns and handle stopping and removing them, enhancing the shutdown process.
- Improved error handling to manage potential issues during the force stop operation, ensuring robustness in service management.
2025-05-22 13:24:46 -06:00
Yury Kossakovsky
16e8b9a059 Refactor environment handling in stop_existing_containers function in start_services.py
- Updated the stop_existing_containers function to explicitly remove the COMPOSE_PROFILES environment variable when stopping and removing containers, ensuring all services are affected.
- Improved clarity by modifying the environment passed to run_command for both stop and remove operations, enhancing the shutdown process consistency.
2025-05-22 13:20:57 -06:00
Yury Kossakovsky
6505208f9c Refactor container shutdown process in start_services.py to improve clarity and functionality
- Updated the stop_existing_containers function to explicitly stop and remove all existing containers for the 'localai' project.
- Enhanced logging to provide clearer messages regarding the presence of the Supabase compose file during the shutdown process.
- Separated the stop and remove commands for better readability and maintainability of the shutdown logic.
2025-05-22 13:19:02 -06:00
Yury Kossakovsky
4750e92a65 Enhance run_command function in start_services.py to accept environment variables
- Modified the run_command function to include an optional env parameter, allowing explicit environment variable management during subprocess execution.
- Updated calls to run_command throughout the script to pass os.environ.copy(), ensuring the correct COMPOSE_PROFILES are used for service operations.
- Removed outdated comments regarding COMPOSE_PROFILES manipulation, reflecting the current environment handling approach.
2025-05-22 11:55:58 -06:00
Yury Kossakovsky
40c63a1d93 Refactor shutdown process in start_services.py to always include Supabase compose file
- Updated the 'down' command to always include the Supabase compose file if it exists, ensuring proper shutdown of services.
- Removed the temporary clearing of COMPOSE_PROFILES, as the current environment is now managed by load_dotenv().
- Enhanced logging to inform users about the presence or absence of the Supabase compose file during shutdown.
2025-05-22 11:52:08 -06:00
Yury Kossakovsky
a729baa3c9 Improve container shutdown process in start_services.py
- Enhanced the 'down' command to conditionally include the Supabase compose file based on the current environment settings.
- Implemented temporary clearing of COMPOSE_PROFILES to ensure all services are affected during shutdown.
- Added error handling to restore the original COMPOSE_PROFILES after command execution, maintaining environment integrity.
2025-05-22 11:43:18 -06:00
Yury Kossakovsky
a461b783b9 Enhance environment variable handling in start_services.py
- Added load_dotenv() to load environment variables from the .env file, ensuring that COMPOSE_PROFILES is retrieved from the environment.
- Updated the is_supabase_enabled() function to check for 'supabase' in the environment variable instead of directly from the .env file.
- Improved the documentation to clarify the reliance on environment variables for service configuration.
2025-05-22 11:39:11 -06:00
Yury Kossakovsky
c1287b69d3 Change file permissions for start_services.py to make it executable 2025-05-14 14:01:15 -06:00
Yury Kossakovsky
97492aa158 Merge remote-tracking branch 'upstream' 2025-05-12 10:49:37 -06:00
Cole Medin
5e83b70fd4 Merge pull request #52 from cprima-forks/fix/searxng-detection-improvements
fix(start_services): improve SearXNG container detection and startup clarity
2025-05-12 07:04:10 -05:00
Yury Kossakovsky
ad5a76f402 Implement Supabase service management in start_services.py and update 04_wizard.sh
- Added functionality to check if Supabase is enabled via the .env file before cloning the repository and preparing the environment.
- Updated the command execution flow to conditionally include Supabase in the Docker commands based on its enabled status.
- Enhanced the service selection wizard in 04_wizard.sh to include Supabase as an option for user selection.
2025-05-09 15:58:33 -06:00
Yury Kossakovsky
c24716930d Refactor local AI service startup in start_services.py
- Removed the profile argument from the start_local_ai function to simplify the service startup process.
- Updated the main function to call start_local_ai without the profile parameter, streamlining the command execution.
2025-05-05 13:57:13 -06:00
Christian Prior-Mamulyan
335150ade9 fix(start_services): improve SearXNG container detection and startup clarity
- Ensure docker exec does not fail hard when checking uwsgi.ini existence
- Improve robustness of first-run detection for SearXNG service
- Small cosmetic improvements to startup logs
- No functional changes if container and file detection succeeds
2025-04-27 23:16:27 +02:00
Christian Prior-Mamulyan
6e2a7e3317 fix: clean up startup process by including Supabase compose and improving container handling
Extended Description:
- Use 'include:' in docker-compose.yml to properly merge Supabase services.
- Update start_services.py to pass --profile during container shutdown to prevent orphan containers and leftover networks.
- Update README upgrade instructions to reflect these changes.
- This fixes the orphan containers, stuck 'localai_default' network, and incomplete Ollama container updates.

This change ensures clean startup/shutdown cycles and improves reliability without increasing complexity.
2025-04-27 23:15:34 +02:00
Cole Medin
cf4d9b8a50 Initial addition of SearXNG and Caddy 2025-03-08 12:17:01 -06:00
Cole Medin
bf966e9d6d Initial Commit for Revamped Local AI Package with Supabase 2025-02-16 15:12:32 -06:00