From 6e7962dd86151676f1c439c88564ee054047f27b Mon Sep 17 00:00:00 2001 From: Valerio Vinciarelli Date: Mon, 5 Feb 2024 13:54:53 +0100 Subject: [PATCH] Fix Data Portal API HOST to gateway --- cmd/docker-compose/docker-compose.yaml | 4 ++-- cmd/functions.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/docker-compose/docker-compose.yaml b/cmd/docker-compose/docker-compose.yaml index f692aec..cfc7eb1 100644 --- a/cmd/docker-compose/docker-compose.yaml +++ b/cmd/docker-compose/docker-compose.yaml @@ -26,8 +26,8 @@ services: - epos_network restart: always environment: - - BASE_URL="/" - - API_HOST="http://gateway:5000/api/v1" + - BASE_URL=/ + - API_HOST=http://gateway:5000/api gateway: image: "${DOCKER_REGISTRY}/${GATEWAY_IMAGE}" container_name: gateway diff --git a/cmd/functions.go b/cmd/functions.go index 078b948..579df95 100644 --- a/cmd/functions.go +++ b/cmd/functions.go @@ -92,12 +92,12 @@ func setupIPs() { val, present := os.LookupEnv("API_HOST_ENV") if present { - fmt.Print(val) + os.Setenv("API_HOST_ENV", val) } else { os.Setenv("API_HOST_ENV", localAddr.IP.String()) } - os.Setenv("API_HOST", "http://"+os.Getenv("API_HOST_ENV")+":"+os.Getenv("API_PORT")+os.Getenv("DEPLOY_PATH")+"/api") + os.Setenv("API_HOST", "http://"+os.Getenv("API_HOST_ENV")+":"+os.Getenv("API_PORT")+os.Getenv("DEPLOY_PATH")+os.Getenv("API_PATH")) os.Setenv("EXECUTE_HOST", "http://"+os.Getenv("API_HOST_ENV")+":"+os.Getenv("API_PORT")) os.Setenv("HOST", "http://"+os.Getenv("API_HOST_ENV")+":"+os.Getenv("GUI_PORT")) os.Setenv("LOCAL_IP", os.Getenv("API_HOST_ENV")) @@ -236,5 +236,5 @@ func getLastDockerImageTag(repo string) string { } func getVersion() string { - return "0.4.0" + return "0.5.0" }