diff --git a/docker-compose.yaml b/docker-compose.yaml index 20ebd809e..da8a4f3b4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -17,7 +17,6 @@ # To import data from the docker host using port 5432 mapped for 127.0.0.1 only use something like this: # $ psql -h 127.0.0.1 -p 5432 -U moqui -W moqui < pg-dump.sql -version: "2" services: moqui-server: image: moqui diff --git a/start.sh b/start.sh index 2e351b196..78c28693f 100755 --- a/start.sh +++ b/start.sh @@ -13,76 +13,6 @@ COMPONENT_SET=${COMPONENT_SET:=""} RUN_LOCAL_SEARCH=${RUN_LOCAL_SEARCH:="true"} search_name=${search_name:="opensearch"} -# Function to check if a command is available -command_exists() { - command -v "$1" &> /dev/null -} - -# Function to install SDKMAN! -install_sdkman() { - echo "Installing SDKMAN!..." - curl -s "https://get.sdkman.io" | bash - source "$HOME/.sdkman/bin/sdkman-init.sh" -} - -# Function to source SDKMAN! -source_sdkman() { - if [ -f "$HOME/.sdkman/bin/sdkman-init.sh" ]; then - source "$HOME/.sdkman/bin/sdkman-init.sh" - else - echo "SDKMAN! not found. Attempting to install SDKMAN!..." - install_sdkman - fi -} - -# Check if Java 11 Temurin is installed -JAVA_INSTALLED=false -if command_exists java; then - JAVA_VERSION=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | cut -d'.' -f1-2) - if [[ "$JAVA_VERSION" == "11.0" ]]; then - JAVA_INSTALLED=true - fi -fi - -# Check if Gradle 7.4.1 is installed -GRADLE_INSTALLED=false -if command_exists gradle; then - GRADLE_VERSION=$(gradle -v | awk '/Gradle/ {print $2}') - if [[ "$GRADLE_VERSION" == "7.4.1" ]]; then - GRADLE_INSTALLED=true - fi -fi - -# Install SDKMAN! and required packages if necessary -if [ "$JAVA_INSTALLED" = false ] || [ "$GRADLE_INSTALLED" = false ]; then - # Ensure SDKMAN! is installed and sourced - source_sdkman - - # Install Java 11 Temurin if not installed - if [ "$JAVA_INSTALLED" = false ]; then - if ! sdk list java | grep -q "11.0.17-tem"; then - echo "Java 11 Temurin not found. Installing Java 11 Temurin..." - sdk install java 11.0.17-tem - else - echo "Java 11 Temurin is available but not in use. Setting as default..." - sdk use java 11.0.17-tem - fi - fi - - # Install Gradle 7.4.1 if not installed - if [ "$GRADLE_INSTALLED" = false ]; then - if ! sdk list gradle | grep -q "7.4.1"; then - echo "Gradle 7.4.1 not found. Installing Gradle 7.4.1..." - sdk install gradle 7.4.1 - else - echo "Gradle 7.4.1 is available but not in use. Setting as default..." - sdk use gradle 7.4.1 - fi - fi -fi - -echo "Java and Gradle setup complete." - # Rest of your script if [ -f "$MOQUI_HOME/moqui-plus-runtime.war" ]; then echo "Using already built moqui-plus-runtime.war"