wip
This commit is contained in:
@@ -166,34 +166,17 @@ read -p "Enter your choice: " choice
|
||||
boldGreen="\e[1m\e[92m"
|
||||
reset="\e[0m"
|
||||
|
||||
# Function to request network configuration URL
|
||||
requestNetworkConfig() {
|
||||
echo "Please provide the network-specific configuration URL."
|
||||
read -p "Paste the URL of the network configuration here (or press Enter to skip): " config_url
|
||||
if [ -n "$config_url" ]; then
|
||||
echo "Network configuration URL provided: $config_url"
|
||||
else
|
||||
echo "No network configuration URL provided, proceeding without it."
|
||||
fi
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Function to handle the setup process for each platform
|
||||
completeSetup() {
|
||||
platform=$1
|
||||
config_url=$2 # Passing this as an argument, though it could be optional or ignored by some setups
|
||||
|
||||
public_address="https://<your public IP address>"
|
||||
|
||||
echo "Proceeding with the setup for $platform..."
|
||||
if [ -n "$config_url" ]; then
|
||||
echo "Using network configuration from: $config_url"
|
||||
fi
|
||||
|
||||
# Insert the specific commands for each platform, including requesting network config if necessary
|
||||
case $platform in
|
||||
"Registry")
|
||||
requestNetworkConfig
|
||||
read -p "Enter publicly accessible registry URL: " registry_url
|
||||
if [[ $registry_url =~ /$ ]]; then
|
||||
new_registry_url=${registry_url%/}
|
||||
@@ -205,7 +188,6 @@ completeSetup() {
|
||||
install_registry $new_registry_url
|
||||
;;
|
||||
"Gateway"|"Beckn Gateway")
|
||||
requestNetworkConfig
|
||||
read -p "Enter your registry URL: " registry_url
|
||||
read -p "Enter publicly accessible gateway URL: " gateway_url
|
||||
|
||||
@@ -223,7 +205,6 @@ completeSetup() {
|
||||
install_gateway $new_registry_url $gateway_url
|
||||
;;
|
||||
"BAP")
|
||||
requestNetworkConfig
|
||||
echo "${GREEN}................Installing Protocol Server for BAP................${NC}"
|
||||
|
||||
read -p "Enter BAP Subscriber ID: " bap_subscriber_id
|
||||
@@ -235,7 +216,6 @@ completeSetup() {
|
||||
install_bap_protocol_server $registry_url $bap_subscriber_id $bap_subscriber_key_id $bap_subscriber_url
|
||||
;;
|
||||
"BPP")
|
||||
requestNetworkConfig
|
||||
echo "${GREEN}................Installing Protocol Server for BAP................${NC}"
|
||||
read -p "Enter BPP Subscriber ID: " bpp_subscriber_id
|
||||
read -p "Enter BPP Subscriber URL: " bpp_subscriber_url
|
||||
@@ -274,8 +254,7 @@ read -p "Enter your choice: " platform_choice
|
||||
selected_platform="${platforms[$((platform_choice-1))]}"
|
||||
|
||||
if [[ -n $selected_platform ]]; then
|
||||
# Note: Passing an empty string for config_url since it's optionally handled within `completeSetup`
|
||||
completeSetup "$selected_platform" ""
|
||||
completeSetup "$selected_platform"
|
||||
else
|
||||
echo "Invalid option. Please restart the script and select a valid option."
|
||||
exit 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version: '3'
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
registry:
|
||||
@@ -12,7 +12,7 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- registry_data_volume:/registry/overrideProperties/config
|
||||
- registry_data_volume:/registry/database
|
||||
- registry_database_volume:/registry/database
|
||||
|
||||
gateway:
|
||||
image: fidedocker/gateway
|
||||
@@ -111,10 +111,13 @@ networks:
|
||||
volumes:
|
||||
registry_data_volume:
|
||||
name: registry_data_volume
|
||||
external: true
|
||||
registry_database_volume:
|
||||
name: registry_database_volume
|
||||
external: true
|
||||
gateway_data_volume:
|
||||
name: gateway_data_volume
|
||||
external: true
|
||||
gateway_database_volume:
|
||||
name: gateway_database_volume
|
||||
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user