phase 2
This commit is contained in:
43
ctrl/Tiltfile
Normal file
43
ctrl/Tiltfile
Normal file
@@ -0,0 +1,43 @@
|
||||
# MPR — Tilt development environment
|
||||
# Usage: cd ctrl && tilt up
|
||||
# Cluster: kind (name: mpr)
|
||||
|
||||
allow_k8s_contexts('kind-mpr')
|
||||
|
||||
# Apply k8s manifests via kustomize (dev overlay)
|
||||
k8s_yaml(kustomize('k8s/overlays/dev'))
|
||||
|
||||
# --- Images — reuse existing Dockerfiles ---
|
||||
|
||||
# FastAPI (Python backend)
|
||||
docker_build(
|
||||
'mpr-fastapi',
|
||||
context='..',
|
||||
dockerfile='Dockerfile',
|
||||
live_update=[
|
||||
sync('..', '/app'),
|
||||
],
|
||||
)
|
||||
|
||||
# Detection UI (Vue 3)
|
||||
docker_build(
|
||||
'mpr-detection',
|
||||
context='../ui/detection-app',
|
||||
dockerfile='../ui/detection-app/Dockerfile',
|
||||
live_update=[
|
||||
sync('../ui/detection-app/src', '/app/src'),
|
||||
sync('../ui/detection-app/index.html', '/app/index.html'),
|
||||
sync('../ui/detection-app/vite.config.ts', '/app/vite.config.ts'),
|
||||
],
|
||||
)
|
||||
|
||||
# Framework changes trigger a full rebuild (live_update can't reach outside context)
|
||||
watch_file('../ui/framework/src')
|
||||
|
||||
# --- Resources ---
|
||||
|
||||
k8s_resource('redis')
|
||||
k8s_resource('fastapi', resource_deps=['redis'])
|
||||
k8s_resource('detection-ui')
|
||||
k8s_resource('gateway', resource_deps=['fastapi', 'detection-ui'],
|
||||
port_forwards=['8080:8080'])
|
||||
Reference in New Issue
Block a user