diff --git a/APP/ogree_app_backend/backend-assets/docker-env-template.txt b/APP/ogree_app_backend/backend-assets/docker-env-template.txt index 28c52a8b..d1d00326 100644 --- a/APP/ogree_app_backend/backend-assets/docker-env-template.txt +++ b/APP/ogree_app_backend/backend-assets/docker-env-template.txt @@ -1,4 +1,4 @@ -CORE_DIR=https://github.com/ditrit/OGrEE-Core.git#feat/bff +CORE_DIR=https://github.com/ditrit/OGrEE-Core.git#{{.ImageTag}} API_BUILD_DIR=API APP_BUILD_DIR=APP API_DOC_UI_PORT={{.DocPort}} diff --git a/APP/ogree_app_backend/tenant.go b/APP/ogree_app_backend/tenant.go index 8978a8db..43cb87de 100644 --- a/APP/ogree_app_backend/tenant.go +++ b/APP/ogree_app_backend/tenant.go @@ -215,25 +215,28 @@ func dockerCreateTenant(newTenant tenant) string { args = append(args, "doc") } + // Default values, empty vars not accepted on docker compose + newTenant.BffApiListFile = "./bff_api_list.json" + newTenant.BffPort = newTenant.ApiPort if newTenant.HasBff { args = append(args, "--profile") args = append(args, "arango") if newTenant.BffPort == "" { - // Set BFF and API ports - newTenant.BffPort = newTenant.ApiPort + // Set API Port to BFF Port + 1 port, _ := strconv.Atoi(newTenant.ApiPort) newTenant.ApiPort = strconv.Itoa(port + 1) } + // Create bff api list json file file, _ := os.Create(appDeployDir + tenantLower + "-bff-api-list.json") err := bfftmplt.Execute(file, newTenant) if err != nil { fmt.Println("Error creating bff api list file: " + err.Error()) - newTenant.BffApiListFile = "./bff_api_list.json" } else { newTenant.BffApiListFile = "./app-deploy/" + tenantLower + "/" + tenantLower + "-bff-api-list.json" } file.Close() } + args = append(args, "up") args = append(args, "--build") args = append(args, "-d")