fix: resolve path for index.html in dashboard api
This commit is contained in:
parent
a312778a36
commit
57bb2a29e1
|
|
@ -116,4 +116,10 @@ async def health():
|
|||
|
||||
@app.get("/{full_path:path}")
|
||||
async def serve_spa(full_path: str):
|
||||
return FileResponse("/app/static/index.html")
|
||||
static_dir = os.path.join(os.path.dirname(__file__), "static")
|
||||
# If the user asks for a static file like JS/CSS, try to serve it directly
|
||||
file_path = os.path.join(static_dir, full_path)
|
||||
if os.path.isfile(file_path) and full_path:
|
||||
return FileResponse(file_path)
|
||||
# Otherwise return the SPA index.html
|
||||
return FileResponse(os.path.join(static_dir, "index.html"))
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ spec:
|
|||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
cpu: 1000m
|
||||
memory: 1024Mi
|
||||
volumes:
|
||||
- name: workspace
|
||||
emptyDir: {}
|
||||
|
|
@ -133,21 +133,21 @@ spec:
|
|||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 30
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
cpu: 1000m
|
||||
memory: 1024Mi
|
||||
volumes:
|
||||
- name: workspace
|
||||
emptyDir: {}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
import sys
|
||||
|
||||
from temporalio.client import Client
|
||||
|
||||
|
||||
async def trigger_pr_review():
|
||||
client = await Client.connect("localhost:7233", namespace="default")
|
||||
address = os.environ.get("TEMPORAL_ADDRESS", "localhost:7233")
|
||||
client = await Client.connect(address, namespace="default")
|
||||
handle = await client.start_workflow(
|
||||
"PRReviewWorkflow",
|
||||
id="bernard-pr-review-run-1",
|
||||
|
|
@ -21,7 +23,8 @@ async def trigger_pr_review():
|
|||
|
||||
|
||||
async def trigger_monitor():
|
||||
client = await Client.connect("localhost:7233", namespace="default")
|
||||
address = os.environ.get("TEMPORAL_ADDRESS", "localhost:7233")
|
||||
client = await Client.connect(address, namespace="default")
|
||||
handle = await client.start_workflow(
|
||||
"TemporalMonitorWorkflow",
|
||||
id="bernard-monitor-run-1",
|
||||
|
|
|
|||
Loading…
Reference in New Issue