Commit Graph

49 Commits

Author SHA1 Message Date
Yury Kossakovsky
ec46f4badc revert: replace --wait flag with sleep delays for service startup
supabase-realtime healthcheck lacks start_period, causing
docker compose --wait to fail before container becomes healthy
2025-12-16 16:58:41 -07:00
Yury Kossakovsky
f3c178858c fix: increase docker compose wait timeout to 180s 2025-12-16 16:37:55 -07:00
Yury Kossakovsky
1ac993a44c refactor: remove --remove-orphans flag from docker compose commands 2025-12-14 14:32:01 -07:00
Yury Kossakovsky
fd953c3e56 fix(supabase): include external compose files in start_local_ai()
The --remove-orphans flag was killing Supabase and Dify containers
because their compose files were not included when starting local AI
services. Now we include them conditionally if they are enabled.
2025-12-14 14:19:50 -07:00
Yury Kossakovsky
b62eefa4da refactor: simplify wizard and improve docker compose startup
- remove quick start mode from wizard, always show service selection
- add --wait flag to docker compose up for proper sequencing
- remove hardcoded time.sleep delays in favor of --wait
- clean up unused imports
2025-12-12 10:10:59 -07:00
Yury Kossakovsky
5dc994eec6 revert: restore -p localai to preserve user data volumes
switching project name from 'localai' to directory-based naming would
cause users to lose all data stored in docker volumes (workflows,
databases, configs) since volumes are prefixed with project name
2025-12-11 11:39:01 -07:00
Yury Kossakovsky
5bf2d4cf31 fix: clean up legacy 'localai' project containers on startup
project was renamed from 'localai' to 'n8n-installer', leaving orphan
containers that cause name conflicts during deployment
2025-12-11 11:39:01 -07:00
Yury Kossakovsky
ef68937d4b fix: add --remove-orphans to main compose up command
prevents container name conflicts when switching profiles by cleaning
up orphaned containers from deactivated services
2025-12-11 11:39:01 -07:00
Yury Kossakovsky
2e81c991e2 fix: add --remove-orphans flag and explicit container names
prevents container name conflicts during restarts by automatically
cleaning up orphaned containers and ensuring langfuse services have
explicit names
2025-12-11 11:39:01 -07:00
Yury Kossakovsky
e608c4705d refactor: remove hardcoded project name from docker compose commands 2025-12-11 11:39:01 -07:00
Yury Kossakovsky
98f2dd807e refactor: integrate worker-runner generation into install/update flow
update configure services to call generate_n8n_workers.sh instead of
prompting for separate runner count. update start_services.py and
apply_update.sh to include docker-compose.n8n-workers.yml when present.
2025-12-11 11:39:01 -07:00
Yury Kossakovsky
7dc78b908c Prevent overwriting existing Supabase environment file in prepare_supabase_env function to avoid credential drift. 2025-09-16 16:50:56 -06:00
Yury Kossakovsky
9ce8689714 Refactor Dify environment setup and configuration
- Updated .env.example to remove deprecated DIFY_NGINX_PORT and streamline Dify application settings.
- Changed reverse proxy port for Dify in Caddyfile from 80 to 8080 for consistency with new configuration.
- Enhanced start_services.py with new functions to check Dify integration, clone the repository, and prepare the environment, ensuring proper setup and configuration of Dify services.
2025-08-07 20:36:39 -06:00
Yury Kossakovsky
45dd593b11 Update Dify environment configuration to support new NGINX exposure ports
- Added DIFY_EXPOSE_NGINX_PORT and DIFY_EXPOSE_NGINX_SSL_PORT to .env.example for improved NGINX configuration.
- Updated start_services.py to set and append these new variables, ensuring backward compatibility with DIFY_NGINX_PORT.
- Enhanced logic to prevent port conflicts by checking and setting the new exposure ports in the generated .env file.
2025-08-07 20:24:44 -06:00
Yury Kossakovsky
86859e1376 Enhance Dify environment preparation in start_services.py
- Updated clone_dify_repo to include both the docker directory and root .env.example during sparse checkout.
- Refactored prepare_dify_env to create a dedicated function for preparing the .env file, improving modularity.
- Enhanced error handling and added warnings for missing directories.
- Implemented logic to create a basic .env if .env.example is not found, ensuring a smoother setup process.
2025-08-07 20:15:34 -06:00
Yury Kossakovsky
e8f99e963b Reduce Dify initialization wait time from 15 to 10 seconds in start_services.py. Update apply_update.sh to include checks for Dify's Docker Compose file, ensuring it is pulled if available. 2025-08-06 19:04:24 -06:00
Yury Kossakovsky
75e154ecea Update Dify configuration in .env.example and Caddyfile
- Removed deprecated DIFY_DB and DIFY_CELERY_BROKER_URL variables from .env.example.
- Updated Caddyfile to change the reverse proxy port for Dify from 80 to 8080.
- Enhanced start_services.py to dynamically set NGINX_PORT to prevent port conflicts.
2025-08-06 18:57:40 -06:00
Yury Kossakovsky
43d7dd6b4e Refactor Dify environment preparation in start_services.py
- Updated prepare_dify_env function to copy .env.example to .env and add the DIFY_SECRET_KEY from the main .env file.
- Improved error handling and added warnings for missing files.
- Created a fallback mechanism to generate a basic .env configuration if .env.example is not found.
2025-08-06 18:48:33 -06:00
Yury Kossakovsky
71e75254a7 Enhance Dify integration in n8n-installer project
- Updated start_services.py to include checks for the Dify Docker Compose file, ensuring proper service shutdown.
- Corrected the Docker Compose file extension from .yml to .yaml in the start_dify function for compatibility.
- Revised activeContext.md and progress.md to reflect the completion and archiving of the Dify AI Platform integration task.
- Created a comprehensive archive document detailing the integration process, challenges, and lessons learned.
- Updated reflection document to capture insights and improvements for future integrations.
2025-08-06 18:35:45 -06:00
Yury Kossakovsky
ea253f4cc5 Add Dify AI Platform integration to n8n-installer project
- Integrated Dify, an open-source AI application development platform, as an optional service in the n8n-installer project.
- Updated start_services.py to include functions for cloning the Dify repository, preparing the environment, and starting Dify services.
- Configured docker-compose.yml to reference Dify's external Docker Compose file and included necessary environment variables.
- Enhanced Caddyfile with reverse proxy settings for Dify, ensuring proper routing and access.
- Updated .env.example to include Dify-specific configuration variables.
- Revised README.md to document Dify's capabilities and access details.
- Enhanced service selection wizard to allow users to choose Dify during setup.
- Comprehensive testing and validation phase pending to ensure full functionality.
2025-08-06 18:01:05 -06:00
Yury Kossakovsky
d74988c8d0 Refactor start_local_ai function to build and start services separately
- Updated the start_local_ai function to first build services and pull newer base images before starting the containers. This ensures that the latest changes are applied and improves the deployment process.
2025-07-31 13:41:56 -06:00
Yury Kossakovsky
58995a0f4c Update start_services.py to rebuild local AI services on startup
- Modified the command in start_local_ai function to include the --build flag, ensuring that local AI services are rebuilt each time they are started, which helps in applying the latest changes to the services.
2025-07-31 13:35:04 -06:00
Yury Kossakovsky
c3246e4365 Add functionality to retrieve all profiles from docker-compose file
- Introduced a new function, get_all_profiles, to extract profile names from the docker-compose.yml file.
- Updated the stop_existing_containers function to include all profiles when stopping services, ensuring a comprehensive shutdown of all relevant containers.
- Added the yaml module to handle YAML file parsing.
- Updated system preparation script to install python3-yaml package for YAML support.
2025-07-02 10:07:03 -06:00
Yury Kossakovsky
5d909ca188 Enhance stop_existing_containers function to conditionally include Supabase Docker Compose file
- Updated the logic to check for the existence of the Supabase Docker Compose file before including it in the 'down' command.
- This change ensures that Supabase services are properly stopped even if they were disabled in the .env file during the last run.
2025-07-02 09:58:00 -06:00
Yury Kossakovsky
05e5eeaada Merge remote-tracking branch 'upstream' into develop 2025-06-23 14:07:56 -06:00
Elvis Dowson
02f7b94a03 Trim whitespaces from files. (#92)
* docker-composer.yml: Remove trailing whitespace.

Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>

* .env.example: Trim training whitespace.

Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>

* start_services.py: Trim training whitespace.

Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>

---------

Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
2025-06-10 08:00:13 -05:00
Yury Kossakovsky
6d55ed2747 Remove hotfix logic for vector configuration in start_services.py
- Eliminated the code that commented out logflare sink entries in vector.yml, streamlining the repository setup process.
- This change improves clarity and reduces unnecessary complexity in the service initialization script.
2025-06-06 11:52:33 -06:00
Yury Kossakovsky
08cca9a664 Apply hotfix to vector configuration in start_services.py
- Added logic to comment out logflare sink entries in vector.yml to disable logflare sinks, improving configuration management.
- Included warnings for missing vector.yml file to enhance user feedback during the hotfix process.
2025-06-06 11:40:08 -06:00
Benny Tops
3e05457049 Open ports on localhost, when in private environment 2025-05-30 15:21:48 +02:00
Benny Tops
beb791acc4 Add concept of environment and reset Supabase ports in public environment 2025-05-29 18:55:13 +02:00
Yury Kossakovsky
73d3d57442 Update Docker Compose handling in start_services.py for security compliance
- Modified the cap_drop directive in the Docker Compose configuration to ensure correct multi-line YAML format.
- Added a note to re-enable the cap_drop directive after the first run for enhanced security.
2025-05-28 17:18:11 -06:00
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