-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·27 lines (24 loc) · 1015 Bytes
/
Copy pathdev.sh
File metadata and controls
executable file
·27 lines (24 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
#
# Dev mode — hot-reload the Lawn Advisor locally, served at https://lawn-dev.forenly.ai
# Edit any file under agent/src/ (incl. static/index.html) and just refresh the browser.
#
# Prod (lawn.forenly.ai) stays on Cloud Run, untouched. When happy: ./deploy.sh
#
set -euo pipefail
cd "$(dirname "$0")"
PROJECT=project-8925a333-2bd2-47ba-af2
sm(){ gcloud secrets versions access latest --secret="$1" --project "$PROJECT" 2>/dev/null; }
export GCP_PROJECT="$PROJECT"
export VERTEX_LOCATION=us-central1
export GEMINI_MODEL_NAME=gemini-2.5-flash
export MONGODB_DB=lawn_advisor
export MONGODB_URI="$(sm mongodb-uri)"
export MAPS_SERVER_KEY="$(sm maps-server-key)"
export MAPS_BROWSER_KEY="$(sm maps-browser-key)"
echo "🔥 Dev hot-reload → https://lawn-dev.forenly.ai (localhost:8000)"
echo " Edit agent/src/* and refresh the browser. Ctrl+C to stop."
exec ~/lawn-dev-venv/bin/uvicorn server:app \
--reload --reload-dir agent/src \
--host 127.0.0.1 --port 8000 \
--app-dir agent/src