This commit is contained in:
Tom Hodson 2025-04-15 14:02:01 +00:00
parent 251bec14fc
commit 6ec4b044b8
5 changed files with 3 additions and 25 deletions

View File

@ -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 }}
---

View File

@ -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))

View File

@ -1,3 +0,0 @@
python3 -m venv .venv
source .venv/bin/activate
pip install pyyaml redis

View File

@ -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/"),
},
)

View File

@ -72,7 +72,7 @@ qube.print()
</div>
<script>
window.API_URL = "{{ api_url }}";
window.API_URL = "{{ api_url }}stac/climate-dt";
</script>
<script src="/static/app.js"></script>
</body>