44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
# 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'])
|