From 6ec4b044b8e60f19c11cf853b6b701648f52507b Mon Sep 17 00:00:00 2001 From: Tom Hodson Date: Tue, 15 Apr 2025 14:02:01 +0000 Subject: [PATCH] fix urls --- chart/templates/stac-server-deployment.yaml | 2 +- scripts/load_redis.py | 19 ------------------- scripts/setup.sh | 3 --- stac_server/main.py | 2 +- stac_server/templates/index.html | 2 +- 5 files changed, 3 insertions(+), 25 deletions(-) delete mode 100755 scripts/load_redis.py delete mode 100644 scripts/setup.sh diff --git a/chart/templates/stac-server-deployment.yaml b/chart/templates/stac-server-deployment.yaml index b8f095d..d4b16e7 100644 --- a/chart/templates/stac-server-deployment.yaml +++ b/chart/templates/stac-server-deployment.yaml @@ -25,7 +25,7 @@ spec: name: api-key key: API_KEY - name: API_URL - value: "https://{{ .Values.ingress.hostname }}/api/v1/stac/climate-dt/" + value: "https://{{ .Values.ingress.hostname }}/api/v1/" ports: - containerPort: {{ .Values.stacServer.servicePort }} --- diff --git a/scripts/load_redis.py b/scripts/load_redis.py deleted file mode 100755 index aa7fc0e..0000000 --- a/scripts/load_redis.py +++ /dev/null @@ -1,19 +0,0 @@ -#! .venv/bin/python - -import redis -import yaml -import json - -print("Opening redis connection") -r = redis.Redis(host="redis", port=6379, db=0) - -print("Loading data from local files") -with open("config/climate-dt/compressed_tree.json") as f: - compressed_catalog = json.load(f) - -with open("config/climate-dt/language.yaml") as f: - mars_language = yaml.safe_load(f)["_field"] - -print("Storing data in redis") -r.set("compressed_catalog", json.dumps(compressed_catalog)) -r.set("mars_language", json.dumps(mars_language)) diff --git a/scripts/setup.sh b/scripts/setup.sh deleted file mode 100644 index 4adc442..0000000 --- a/scripts/setup.sh +++ /dev/null @@ -1,3 +0,0 @@ -python3 -m venv .venv -source .venv/bin/activate -pip install pyyaml redis diff --git a/stac_server/main.py b/stac_server/main.py index e009e37..9aa69b6 100644 --- a/stac_server/main.py +++ b/stac_server/main.py @@ -139,7 +139,7 @@ async def read_root(request: Request): "config": { "message": "Hello from the dev server!", }, - "api_url": os.environ.get("API_URL", "/api/v1/stac/climate-dt"), + "api_url": os.environ.get("API_URL", "/api/v1/"), }, ) diff --git a/stac_server/templates/index.html b/stac_server/templates/index.html index 5984fc9..83662a8 100644 --- a/stac_server/templates/index.html +++ b/stac_server/templates/index.html @@ -72,7 +72,7 @@ qube.print()