fix urls
This commit is contained in:
parent
251bec14fc
commit
6ec4b044b8
@ -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 }}
|
||||||
---
|
---
|
||||||
|
@ -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))
|
|
@ -1,3 +0,0 @@
|
|||||||
python3 -m venv .venv
|
|
||||||
source .venv/bin/activate
|
|
||||||
pip install pyyaml redis
|
|
@ -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/"),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user