Skip to content

Commit 384eafb

Browse files
committed
Bichon: add read for public URL
1 parent ba23b7d commit 384eafb

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

install/bichon-install.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ update_os
1515

1616
fetch_and_deploy_gh_release "bichon" "rustmailer/bichon" "prebuild" "latest" "/opt/bichon" "bichon-*-x86_64-unknown-linux-gnu.tar.gz"
1717

18+
read -r -p "Enter the public URL for Bichon (e.g., https://bichon.yourdomain.com) or leave empty to use container IP: " bichon_url
19+
if [[ -z "$bichon_url" ]]; then
20+
msg_info "No URL provided"
21+
BICHON_PUBLIC_URL="http://$LOCAL_IP:15630"
22+
msg_ok "using local IP: http://$LOCAL_IP:15630\n"
23+
else
24+
BICHON_PUBLIC_URL="$bichon_url"
25+
msg_info "URL provided"
26+
msg_ok "Using provided URL: $BICHON_PUBLIC_URL\n"
27+
fi
28+
1829
msg_info "Setting up Bichon"
1930
mkdir -p /opt/bichon-data
2031
BICHON_ENC_PASSWORD=$(openssl rand -base64 32 | tr -d "=+/" | cut -c1-32)
@@ -23,8 +34,8 @@ cat <<EOF >/opt/bichon/bichon.env
2334
BICHON_ROOT_DIR=/opt/bichon-data
2435
BICHON_LOG_LEVEL=info
2536
BICHON_ENCRYPT_PASSWORD=$BICHON_ENC_PASSWORD
26-
BICHON_PUBLIC_URL=http://${LOCAL_IP}:15630
27-
BICHON_CORS_ORIGINS=http://${LOCAL_IP}:15630
37+
BICHON_PUBLIC_URL=$BICHON_PUBLIC_URL
38+
BICHON_CORS_ORIGINS=$BICHON_PUBLIC_URL
2839
EOF
2940
msg_ok "Setup Bichon"
3041

0 commit comments

Comments
 (0)