diff --git a/install/bichon-install.sh b/install/bichon-install.sh index 01f802880..9feee90e7 100644 --- a/install/bichon-install.sh +++ b/install/bichon-install.sh @@ -15,6 +15,17 @@ update_os fetch_and_deploy_gh_release "bichon" "rustmailer/bichon" "prebuild" "latest" "/opt/bichon" "bichon-*-x86_64-unknown-linux-gnu.tar.gz" +read -r -p "Enter the public URL for Bichon (e.g., https://bichon.yourdomain.com) or leave empty to use container IP: " bichon_url +if [[ -z "$bichon_url" ]]; then + msg_info "No URL provided" + BICHON_PUBLIC_URL="http://$LOCAL_IP:15630" + msg_ok "using local IP: http://$LOCAL_IP:15630\n" +else + BICHON_PUBLIC_URL="$bichon_url" + msg_info "URL provided" + msg_ok "Using provided URL: $BICHON_PUBLIC_URL\n" +fi + msg_info "Setting up Bichon" mkdir -p /opt/bichon-data BICHON_ENC_PASSWORD=$(openssl rand -base64 32 | tr -d "=+/" | cut -c1-32) @@ -23,8 +34,8 @@ cat </opt/bichon/bichon.env BICHON_ROOT_DIR=/opt/bichon-data BICHON_LOG_LEVEL=info BICHON_ENCRYPT_PASSWORD=$BICHON_ENC_PASSWORD -BICHON_PUBLIC_URL=http://${LOCAL_IP}:15630 -BICHON_CORS_ORIGINS=http://${LOCAL_IP}:15630 +BICHON_PUBLIC_URL=$BICHON_PUBLIC_URL +BICHON_CORS_ORIGINS=$BICHON_PUBLIC_URL EOF msg_ok "Setup Bichon"