Open
Conversation
This commit adds a new 'install-fleetbase' command to the CLI that automates the Fleetbase Docker installation process. ## Features - Interactive prompts for host, environment, and directory - Command-line options for non-interactive usage - Automatic APP_KEY generation using crypto - Creates docker-compose.override.yml with environment configuration - Creates console/fleetbase.config.json with API and SocketCluster settings - Starts Docker containers and waits for database readiness - Runs deployment script automatically - Provides clear status messages and error handling ## Usage Interactive mode: flb install-fleetbase Non-interactive mode: flb install-fleetbase --host localhost --environment development --directory ./fleetbase ## Options --host <host> Host or IP address to bind to (default: localhost) --environment <env> Environment: development or production (default: development) --directory <directory> Installation directory (default: current directory) ## Implementation The command replicates the functionality of scripts/docker-install.sh but provides a better user experience through: - Interactive prompts with validation - Clear progress indicators - Better error messages - Cross-platform compatibility (Node.js vs Bash) - Integration with the CLI ecosystem ## Benefits - Easier onboarding for new users - Consistent installation experience - No need to navigate to scripts directory - Better error handling and validation - Works on Windows, macOS, and Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds a new
install-fleetbasecommand to the Fleetbase CLI, making it easier for users to install Fleetbase using Docker without having to manually run bash scripts.Motivation
Currently, users need to:
scriptsdirectory./docker-install.shThis PR simplifies the process by integrating installation directly into the CLI, providing a more consistent and user-friendly experience.
Features
Interactive Mode
Prompts the user for:
Non-Interactive Mode
All parameters can be provided via command-line options for automation and scripting.
What It Does
docker-compose.ymldocker compose up -ddeploy.shinside application containerCommand Options
--host <host>localhost--environment <env>development--directory <dir>Implementation Details
Configuration Logic
Development Environment:
APP_DEBUG=trueSOCKETCLUSTER_SECURE=falseProduction Environment:
APP_DEBUG=falseSOCKETCLUSTER_SECURE=trueError Handling
docker-compose.ymlCross-Platform Compatibility
Unlike the bash script (
docker-install.sh), this Node.js implementation works on:Example Output
Benefits
✅ Better UX - Integrated into CLI workflow
✅ Cross-platform - Works on Windows, macOS, Linux
✅ Automation-friendly - Supports non-interactive mode
✅ Better error handling - Clear validation and error messages
✅ Consistent - Uses same CLI patterns as other commands
✅ Documented - Built-in help via
flb install-fleetbase --helpTesting Checklist
Related Work
This command complements the existing installation documentation and provides an alternative to the bash script for users who prefer CLI-based workflows.
Future Enhancements
Potential future improvements:
--skip-deployflag to skip automatic deployment--pullflag to pull latest images before starting--verboseflag for detailed Docker output