From 10b40599db15b0fc2d070b2478a090bbb8259d31 Mon Sep 17 00:00:00 2001 From: Nao Yonashiro Date: Fri, 11 Oct 2024 16:42:50 +0900 Subject: [PATCH] chore(server): Added default values to the configuration of the CityGML service --- .github/workflows/build-worker.yml | 2 +- server/config.go | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-worker.yml b/.github/workflows/build-worker.yml index 2a5e9149..bfe32064 100644 --- a/.github/workflows/build-worker.yml +++ b/.github/workflows/build-worker.yml @@ -1,4 +1,4 @@ -name: build-server +name: build-worker on: workflow_call: jobs: diff --git a/server/config.go b/server/config.go index a90d608f..a36a4cbc 100644 --- a/server/config.go +++ b/server/config.go @@ -225,11 +225,23 @@ func (c *Config) plateauCMS() plateaucms.Config { } func (c *Config) CityGML() citygml.Config { + workRegion := c.CityGML_WorkerRegion + if workRegion == "" { + workRegion = c.GOOGLE_CLOUD_REGION + } + workProject := c.CityGML_WorkerProject + if workProject == "" { + workProject = c.GOOGLE_CLOUD_PROJECT + } + citygmlPackerImage := c.CityGML_CityGMLPackerImage + if citygmlPackerImage == "" { + citygmlPackerImage = "ghcr.io/eukarya-inc/plateau-view-3.0/plateauview-api-worker:latest" + } return citygml.Config{ Domain: c.CityGML_Domain, Bucket: c.CityGML_Bucket, - CityGMLPackerImage: c.CityGML_CityGMLPackerImage, - WorkerRegion: c.CityGML_WorkerRegion, - WorkerProject: c.CityGML_WorkerProject, + CityGMLPackerImage: citygmlPackerImage, + WorkerRegion: workRegion, + WorkerProject: workProject, } }