36 Commits

Author SHA1 Message Date
Yury Kossakovsky
58799d9ae1 refactor(compose): centralize external compose file handling
add build_compose_files_array() and getter functions for n8n-workers,
supabase, dify compose files in utils.sh. simplifies restart.sh and
apply_update.sh by using shared function. now checks both profile
activation AND file existence before including external compose files.
2025-12-29 13:06:03 -07:00
Yury Kossakovsky
944844871a refactor: rename postgresus to databasus
rebrand backup service following upstream project rename.
updates docker image to databasus/databasus:latest,
adds healthcheck, and includes cleanup function for
migration from old container name.
2025-12-28 11:00:07 -07:00
Yury Kossakovsky
9b252a1287 refactor(update): replace git pull with fetch + reset for reliable sync
extract git utilities into scripts/git.sh module. this approach handles
accidental local commits that would cause rebase conflicts during updates.
2025-12-26 09:29:53 -07:00
Yury Kossakovsky
8b08442815 refactor: extract telemetry and database modules
- create scripts/telemetry.sh with all telemetry functions
- rename init_databases.sh to databases.sh and convert to library
- remove code duplication in init_all_databases()
- update all scripts to source new modules
- update documentation references
2025-12-25 18:22:05 -07:00
Yury Kossakovsky
a1521f8a48 feat: add error telemetry with stage tracking
sends minimal data to scarf on install/update failures:
event type, stage, exit_code. uses err trap in orchestrator
scripts. respects existing opt-out settings.
2025-12-25 18:22:05 -07:00
Yury Kossakovsky
ffca8693f7 feat: add anonymous telemetry via scarf
collect basic usage statistics (install/update events, version, os, selected
services) to help improve the project. users can opt-out by setting
SCARF_ANALYTICS=false or DO_NOT_TRACK=1.
2025-12-25 16:32:32 -07:00
Yury Kossakovsky
30e4c9407b fix: initialize databases before starting dependent services
- start postgresql first, then run init_databases.sh, then other services
- add depends_on postgres for lightrag service
- remove unused nocodb from databases list
- document database initialization in add-new-service workflow
2025-12-25 13:15:07 -07:00
Yury Kossakovsky
f32c92287e feat: add isolated postgresql databases for services
add init_databases.sh script that creates dedicated databases for
langfuse, lightrag, nocodb, postiz, and waha during install/update.
update connection strings to use service-specific databases instead
of sharing the default postgres database.
2025-12-25 11:25:31 -07:00
Yury Kossakovsky
531d34a328 fix: run permission fix after every update
Some hosting providers (CLOUD.RU, etc.) reset file permissions during
updates, leaving .env and generated files owned by root. This prevents
normal users from reading configuration.

Now 08_fix_permissions.sh runs after each update to restore proper
ownership and permissions.
2025-12-17 11:18:07 -07:00
Yury Kossakovsky
20106f21f8 feat: fix file ownership after sudo installation
add step 8 to installation that restores file ownership to the invoking
user when running with sudo. also adds cleanup for legacy n8n worker
containers during updates.

- add 08_fix_permissions.sh script to detect real user and fix ownership
- add get_real_user() utility with multiple fallback detection methods
- add cleanup_legacy_n8n_workers() to remove old container naming format
- set restrictive permissions (600) on .env file for security
2025-12-16 16:07:08 -07:00
Yury Kossakovsky
e0018f2b2d refactor: consolidate shared utilities and add script documentation
- move common functions to utils.sh: init_paths, read_env_var, write_env_var,
  is_profile_active, load_env, gen_password, gen_hex, gen_base64, generate_bcrypt_hash
- add documentation headers to all installation scripts
- replace duplicate code with shared utility calls
- consolidate bcrypt hash generation loop in 03_generate_secrets.sh
- add DEBIAN_FRONTEND save/restore helpers for whiptail scripts
- standardize path initialization across all scripts
2025-12-12 09:58:12 -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
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
03a6812ec5 Refactor service configuration scripts and streamline .env updates
- Removed redundant prompts for OpenAI API key and Cloudflare Tunnel token in `03_generate_secrets.sh` and `04_wizard.sh`.
- Introduced `05_configure_services.sh` to handle service configuration and .env updates, improving clarity and maintainability.
- Enhanced user prompts for n8n worker count and workflow import settings, ensuring better user experience during configuration.
- Updated installation script to include the new configuration script, ensuring a cohesive setup process.
2025-08-28 18:42:50 -06:00
Yury Kossakovsky
2b3b602fa7 Refactor service scripts and update final report generation
- Renamed and reorganized service scripts: `05_run_services.sh` is now `06_run_services.sh`, and `06_final_report.sh` is now `07_final_report.sh`.
- Updated references in documentation and other scripts to reflect the new script names.
- Enhanced the final report script to include access details for newly integrated services, ensuring comprehensive output for users.
2025-08-28 18:42:43 -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
3139ca54de Refactor logging messages in scripts for clarity
- Removed redundant log message in 04_wizard.sh related to COMPOSE_PROFILES.
- Updated success messages in apply_update.sh for improved readability and conciseness.
2025-05-28 16:45:52 -06:00
Yury Kossakovsky
c10e8df0a3 Update environment configuration and enhance logging in scripts
- Added COMPOSE_PROFILES variable to .env.example for better service profile management.
- Enhanced logging in 04_wizard.sh to provide clearer information on the read COMPOSE_PROFILES value.
- Updated apply_update.sh to improve success messages and removed redundant service stopping logic for clarity.
2025-05-27 20:49:41 -06:00
Yury Kossakovsky
3c9a39d446 Enhance domain input handling in 03_generate_secrets.sh and update apply_update.sh
- Introduced logic to infer the current domain from N8N_HOSTNAME or SUPABASE_HOSTNAME for user prompts in 03_generate_secrets.sh.
- Improved user prompts to display the current domain as a default suggestion, enhancing user experience.
- Updated apply_update.sh to ensure the .env file is checked and updated by calling 03_generate_secrets.sh during the update process.
2025-05-24 10:15:04 -06:00
Yury Kossakovsky
ab7997a4ca Remove redundant log messages in scripts for improved clarity
- Eliminated unnecessary log_info statements in 03_generate_secrets.sh, 06_final_report.sh, and apply_update.sh to streamline output and enhance readability.
- Adjusted echo statements in 06_final_report.sh to maintain focus on essential information without clutter.
2025-05-23 17:37:27 -06:00
Yury Kossakovsky
eeb19f590f Refactor logging and user prompts in installation and wizard scripts
- Enhanced user feedback by replacing echo statements with log_info and log_error for better consistency in logging.
- Added empty echo statements before user prompts in 03_generate_secrets.sh to improve readability.
- Removed unnecessary log messages related to Caddy installation and uninstallation in 03_generate_secrets.sh.
- Updated 04_wizard.sh to include utility sourcing and improved logging for service selection and profile updates.
- Streamlined apply_update.sh by removing redundant log messages regarding Supabase compose file checks.
2025-05-23 15:05:23 -06:00
Yury Kossakovsky
6cd3eb7927 Refactor apply_update.sh to streamline service update process
- Removed redundant service selection wizard invocation from the pull section, ensuring it runs first to update service choices.
- Enhanced logging messages for clarity regarding the Supabase compose file inclusion and Docker image pulling.
- Improved error handling for the service selection wizard failure, preventing continuation of the update process if it fails.
2025-05-22 14:19:28 -06:00
Yury Kossakovsky
5eae1e4872 Remove container removal command from apply_update.sh for 'localai' project to streamline shutdown process and improve error handling. 2025-05-22 14:11:08 -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
8c017549f2 Add final report display in apply_update.sh to show service credentials
- Implemented a final report display feature in apply_update.sh to show service credentials post-update.
- Added error handling to log a warning if the final report fails to display, ensuring the update process remains unaffected.
- Enhanced user experience by providing a summary of service credentials after a successful update.
2025-05-22 11:29:09 -06:00
Yury Kossakovsky
2baafa495b Refactor service selection in wizard script and integrate into update process
- Updated the service selection logic in 04_wizard.sh to dynamically populate available services based on current COMPOSE_PROFILES from the .env file.
- Enhanced the Ollama hardware profile selection to reflect user choices and defaults based on existing profiles.
- Integrated the service selection wizard into apply_update.sh to streamline the update process and ensure user-defined service configurations are applied.
- Improved user prompts and handling for service choices, enhancing overall configuration experience.
2025-05-22 11:27:45 -06:00
Yury Kossakovsky
ae5cd1aab2 Enhance n8n import handling in apply_update.sh and update secrets generation
- Added logic to determine the N8N_WORKFLOWS_IMPORTED_EVER variable based on existing environment values and user input.
- Updated the apply_update.sh script to check if workflows have been imported previously, modifying the RUN_N8N_IMPORT and N8N_WORKFLOWS_IMPORTED_EVER variables accordingly.
- Improved user prompts for importing n8n workflows, ensuring a smoother configuration experience.
2025-05-22 11:22:11 -06:00
Yury Kossakovsky
0bada5dde9 Remove logging of current n8n worker count in apply_update.sh to streamline user prompts and enhance clarity during input collection. 2025-05-14 14:41:07 -06:00
Yury Kossakovsky
cd866edbdd Improve user prompts in 03_generate_secrets.sh and apply_update.sh
- Standardized prompt formatting by removing unnecessary newline characters, enhancing clarity and consistency in user interactions.
- Updated prompts to ensure a more straightforward user experience during input collection, particularly for domain name, email, and n8n worker count inputs.
2025-05-14 14:37:55 -06:00
Yury Kossakovsky
61ebcc8982 Refine n8n workflow import prompt in apply_update.sh
- Updated the user prompt to clarify the response options for importing n8n workflows, enhancing user understanding and interaction.
- Ensured consistency in prompt formatting across the script for improved user experience.
2025-05-14 14:35:57 -06:00
Yury Kossakovsky
a1a1d2509a Enhance user prompts in 03_generate_secrets.sh and apply_update.sh
- Updated prompts to use printf for better formatting, ensuring dynamic inclusion of variable values in user messages.
- Improved user experience by making prompts clearer and more informative during input collection.
2025-05-14 14:35:05 -06:00
Yury Kossakovsky
ea8e2e07ed Enhance user prompts in 03_generate_secrets.sh and apply_update.sh
- Updated prompts to include newline characters for better readability, improving user experience during input collection.
- Ensured consistency in user interaction across scripts by standardizing prompt formatting.
2025-05-14 14:30:43 -06:00
Yury Kossakovsky
4022be004d Refactor n8n workflow import prompt in apply_update.sh
- Simplified the user prompt for importing n8n workflows by removing the check for the RUN_N8N_IMPORT variable being true, allowing users to indicate if they have already imported the workflow.
- Retained the logic for modifying the RUN_N8N_IMPORT variable based on user input, ensuring flexibility in workflow management.
2025-05-14 14:26:01 -06:00
Yury Kossakovsky
27634c630f Enhance n8n workflow import handling in apply_update.sh
- Added a check to skip the import prompt if RUN_N8N_IMPORT is already set to true in the .env file, improving user experience by preventing unnecessary prompts.
- Retained the existing logic for modifying the RUN_N8N_IMPORT variable based on user input, ensuring flexibility in workflow management.
2025-05-14 14:15:59 -06:00
Yury Kossakovsky
d6f3522ca7 Add apply_update.sh script to streamline update process
- Introduced a new script, apply_update.sh, to handle the update process, including stopping services, pulling the latest container versions, and modifying the .env file based on user input for n8n workflow import and worker count.
- Refactored update.sh to delegate the update tasks to apply_update.sh, improving code organization and maintainability.
- Enhanced error handling and logging throughout the update process for better user experience and troubleshooting.
2025-05-12 12:25:58 -06:00