diff --git a/devbox/devbox.local/cli/devbox b/devbox/cli/devbox similarity index 98% rename from devbox/devbox.local/cli/devbox rename to devbox/cli/devbox index ca607ed..4f279eb 100644 --- a/devbox/devbox.local/cli/devbox +++ b/devbox/cli/devbox @@ -94,6 +94,16 @@ devbox_init_guidance() { add_arg "--use-custom-repository" "$use_custom_repository" ;; 2) + # Check if product_id is empty + if [[ -z $product_id ]]; then + # Ask user for product_id + read -p "Enter your product_id: " product_id + if [[ -z $product_id ]]; then + printf "Product ID is required.\n" + exit 1 + fi + fi + # Ask user for Freeleaps.com username and password read -p "Enter your Freeleaps.com username: " freeleaps_username read -s -p "Enter your Freeleaps.com password: " freeleaps_password @@ -112,7 +122,7 @@ devbox_init_guidance() { exit 1 fi - printf "Repository connection successful.\n" + printf "Repository connection successfully.\n" add_arg "--use-custom-repository" "$use_custom_repository" ;; @@ -128,16 +138,39 @@ devbox_usage() { printf "Command\n" printf " devbox : DevBox Command Line Tool for managing the local development environment.\n\n" + printf "Usage\n" + printf " devbox : Interactive mode to initialize development environment\n" + printf " devbox freeleaps : Initialize Freeleaps.com development environment\n" + printf " devbox : Initialize specific product development environment\n\n" + printf "Arguments\n" - printf " COMMAND [Required] : Specify the command to execute (e.g., init, deinit, start, stop, status, restart).\n\n" + printf " COMMAND [Required] : Specify the command to execute.\n" + printf " init, i : Initialize the local development environment.\n" + printf " deinit, d : De-initialize the local development environment.\n" + printf " start, s : Start services in the local development environment.\n" + printf " stop, p : Stop services in the local development environment.\n" + printf " status, t : Display status of services in the local environment.\n" + printf " restart, r : Restart services in the local environment.\n\n" printf "Global Arguments\n" printf " --help, -h : Show this help message and exit.\n" printf " --version, -v : Show version number.\n\n" printf "Examples\n" + printf " Initialize development environment interactively:\n" + printf " devbox\n\n" + printf " Initialize Freeleaps.com development environment:\n" + printf " devbox freeleaps\n\n" + printf " Initialize specific product development environment:\n" + printf " devbox \n\n" + printf " Initialize development environment with command:\n" + printf " devbox init\n\n" printf " Display help for the 'init' command:\n" printf " devbox init --help\n\n" + printf " Start all services:\n" + printf " devbox start\n\n" + printf " Start specific service:\n" + printf " devbox start --component=backend\n\n" printf " Display version information:\n" printf " devbox --version\n" echo @@ -559,7 +592,6 @@ get_port() { break fi done - echo "$port" } # Build the local image @@ -1070,7 +1102,7 @@ if [[ $USE_LOCAL_COMPONENT_VAL == true ]]; then # Start Gitea, MongoDB, RabbitMQ and other components containers echo "===> start Gitea, MongoDB, RabbitMQ and other components containers" - docker-compose -f docker-compose.dev.arm64.new.yaml up -d mongodb rabbitmq gitea redis "${start_components[@]}" + docker-compose -f docker-compose.yaml up -d mongodb rabbitmq gitea redis "${start_components[@]}" gitea_container_id=$(docker ps --no-trunc -a --filter "name=^freeleaps2-gitea$" --format "{{.ID}}") echo "$gitea_container_id" > "$WORKING_HOME/.gitea-instance" @@ -1112,7 +1144,7 @@ else echo ' ===> Using online components for Freeleaps services.' echo '============================================' # Start Gitea, MongoDB, RabbitMQ containers - docker-compose -f docker-compose.dev.arm64.new.yaml up -d mongodb rabbitmq redis + docker-compose -f docker-compose.yaml up -d mongodb rabbitmq redis # Save MongoDB and RabbitMQ container ids to .mongodb-instance and .rabbitmq-instance mongo_container_id=$(docker ps -a --format '{{.Names}}' | grep "^freeleaps2-mongodb\$") @@ -1781,6 +1813,7 @@ if [[ "${START_FRONTEND}" == "true" ]]; then git status -s > "\$baseline_file" echo "==> Baseline file created: \$baseline_file" + # Check if the frontend service is already running according to the package.json and pnpm-lock.yaml files timestamps if [[ ! -d "node_modules" || "package.json" -nt "node_modules" || "pnpm-lock.yaml" -nt "node_modules" ]]; then echo "==> Installing/Updating frontend dependencies..." @@ -2386,7 +2419,6 @@ parse_requirements() { "") devbox_init_guidance >&2 action="init" - shift devbox_init_parse_requirements "$@" shift $# ;; diff --git a/devbox/devbox.local/cli/docker-compose.dev.arm64.new.yaml b/devbox/cli/docker-compose.yaml similarity index 100% rename from devbox/devbox.local/cli/docker-compose.dev.arm64.new.yaml rename to devbox/cli/docker-compose.yaml diff --git a/devbox/devbox.local/cli/gitea_data_backup.tar.gz b/devbox/cli/gitea_data_backup.tar.gz similarity index 100% rename from devbox/devbox.local/cli/gitea_data_backup.tar.gz rename to devbox/cli/gitea_data_backup.tar.gz diff --git a/devbox/devbox.local/cli/freeleaps b/devbox/devbox.local/cli/freeleaps deleted file mode 160000 index ca58e0b..0000000 --- a/devbox/devbox.local/cli/freeleaps +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ca58e0b8f9d91c297da64c440b799ff913cb24f2