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 name: api-key
key: API_KEY key: API_KEY
- name: API_URL - name: API_URL
value: "https://{{ .Values.ingress.hostname }}/api/v1/stac/climate-dt/" value: "https://{{ .Values.ingress.hostname }}/api/v1/"
ports: ports:
- containerPort: {{ .Values.stacServer.servicePort }} - 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": { "config": {
"message": "Hello from the dev server!", "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> </div>
<script> <script>
window.API_URL = "{{ api_url }}"; window.API_URL = "{{ api_url }}stac/climate-dt";
</script> </script>
<script src="/static/app.js"></script> <script src="/static/app.js"></script>
</body> </body>