Issue 535 - merge docker compose file and update docs

This commit is contained in:
ameersohel45
2025-10-15 15:10:06 +05:30
parent 11e7047cb2
commit 261822c935
7 changed files with 43 additions and 43 deletions

View File

@@ -625,18 +625,18 @@ validate_config_modules() {
if [[ "$key_type" == "BAP" && $has_bap_modules -eq 0 ]]; then
echo "${RED}Error: BAP deployment selected but no BAP modules found in config file${NC}"
echo "${BLUE}Config file: $config_file${NC}"
echo "${YELLOW}Please update docker-compose-adapter2.yml to use a config file with BAP modules${NC}"
echo "${YELLOW}Please update docker-compose-adapter.yml to use a config file with BAP modules${NC}"
return 1
elif [[ "$key_type" == "BPP" && $has_bpp_modules -eq 0 ]]; then
echo "${RED}Error: BPP deployment selected but no BPP modules found in config file${NC}"
echo "${BLUE}Config file: $config_file${NC}"
echo "${YELLOW}Please update docker-compose-adapter2.yml to use a config file with BPP modules${NC}"
echo "${YELLOW}Please update docker-compose-adapter.yml to use a config file with BPP modules${NC}"
return 1
elif [[ "$key_type" == "BOTH" && ($has_bap_modules -eq 0 || $has_bpp_modules -eq 0) ]]; then
echo "${RED}Error: Combined deployment selected but missing modules in config file${NC}"
echo "${BLUE}Config file: $config_file${NC}"
echo "${BLUE}BAP modules found: $has_bap_modules, BPP modules found: $has_bpp_modules${NC}"
echo "${YELLOW}Please update docker-compose-adapter2.yml to use a config file with both BAP and BPP modules${NC}"
echo "${YELLOW}Please update docker-compose-adapter.yml to use a config file with both BAP and BPP modules${NC}"
return 1
fi
@@ -656,9 +656,9 @@ configure_onix_registry_keys() {
# Determine config file - only auto-detect if not provided
if [ -z "$config_file" ]; then
local docker_config=$(grep -o '/app/config/[^"]*' docker-compose-adapter2.yml | head -1)
local docker_config=$(grep -o '/app/config/[^"]*' docker-compose-adapter.yml | head -1)
if [ -z "$docker_config" ]; then
echo "${RED}Error: Could not find config file in docker-compose-adapter2.yml${NC}"
echo "${RED}Error: Could not find config file in docker-compose-adapter.yml${NC}"
return 1
fi
config_file="${docker_config/\/app\/config\//../config/}"
@@ -878,6 +878,14 @@ install_adapter() {
local key_type=${1:-"BOTH"}
local config_file=$2
# Create schemas directory for validation
if [ ! -d "schemas" ]; then
mkdir -p schemas
echo -e "${GREEN}✓ Created schemas directory${NC}"
else
echo -e "${YELLOW}schemas directory already exists${NC}"
fi
echo "${GREEN}................Building plugins for ONIX Adapter................${NC}"
# Build plugins the same way as setup.sh

View File

@@ -16,6 +16,27 @@ services:
interval: 5s
timeout: 3s
retries: 5
onix-adapter:
image: fidedocker/onix-adapter
container_name: onix-adapter
platform: linux/amd64
networks:
- beckn_network
ports:
- "8081:8081"
environment:
CONFIG_FILE: "/app/config/local-simple.yaml"
VAULT_ADDR: http://vault:8200
VAULT_TOKEN: root
REDIS_ADDR: redis:6379
RABBITMQ_ADDR: rabbitmq:5672
RABBITMQ_USER: admin
RABBITMQ_PASS: admin123
volumes:
- ../config:/app/config
- ../schemas:/app/schemas
command: ["./server", "--config=/app/config/local-simple.yaml"]
# Vault - Key Management Service
vault:

View File

@@ -1,29 +0,0 @@
version: '3.8'
services:
onix-adapter:
image: fidedocker/onix-adapter
container_name: onix-adapter
platform: linux/amd64
networks:
- beckn_network
ports:
- "8081:8081"
environment:
CONFIG_FILE: "/app/config/local-simple.yaml"
VAULT_ADDR: http://vault:8200
VAULT_TOKEN: root
REDIS_ADDR: redis:6379
RABBITMQ_ADDR: rabbitmq:5672
RABBITMQ_USER: admin
RABBITMQ_PASS: admin123
volumes:
- ../config:/app/config
- ../schemas:/app/schemas
command: ["./server", "--config=/app/config/local-simple.yaml"]
#command: ["sh", "-c", "ls -la plugins schemas config"]
networks:
beckn_network:
name: beckn_network
driver: bridge

View File

@@ -74,4 +74,4 @@ bap_docker_compose_file=docker-compose-bap.yml
registry_docker_compose_file=docker-compose-registry.yml
gateway_docker_compose_file=docker-compose-gateway.yml
gcl_docker_compose_file=docker-compose-gcl.yml
adapter_docker_compose_file=docker-compose-adapter2.yml
adapter_docker_compose_file=docker-compose-adapter.yml

View File

@@ -148,7 +148,7 @@ fi
# Step 5: Start ONIX Adapter
echo -e "${YELLOW}Step 5: Starting ONIX Adapter...${NC}"
cd install
docker compose -f ./docker-compose-adapter2.yml up -d
docker compose -f ./docker-compose-adapter.yml up -d onix-adapter
echo "ONIX Adapter installation successful"
cd ..
@@ -204,8 +204,8 @@ echo -e "3. Test the endpoints:"
echo -e " ${YELLOW}curl -X POST http://localhost:8081/bap/caller/search${NC}"
echo ""
echo -e "4. Stop all services:"
echo -e " ${YELLOW}cd install && docker compose -f docker-compose-adapter.yml down && docker compose -f docker-compose-adapter2.yml down${NC}"
echo -e " ${YELLOW}cd install && docker compose -f docker-compose-adapter.yml down ${NC}"
echo ""
echo -e "5. View logs:"
echo -e " ${YELLOW}cd install && docker compose -f docker-compose-adapter2.yml logs -f onix-adapter${NC}"
echo -e " ${YELLOW}cd install && docker compose -f docker-compose-adapter.yml logs -f onix-adapter${NC}"
echo -e "${GREEN}========================================${NC}"