Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 1007 Bytes

File metadata and controls

30 lines (26 loc) · 1007 Bytes

Deploy to Google Cloud (Cloud Run)

Prerequisites

  • Google Cloud SDK Installed
  • Authenticated (gcloud auth login)
  • Project Set (gcloud config set project developertrack2025)
  • Region Set (gcloud config set run/region us-central1)

1. Deploy Backend (API)

cd backend
gcloud run deploy chatbot-backend `
  --source . `
  --region us-central1 `
  --allow-unauthenticated `
  --set-env-vars PROJECT_ID=developertrack2025,LOCATION=us-central1,BUCKET=customer-intent-data,BQ_ENABLED=1,BQ_DATASET=intent_analytics,BQ_TABLE=request_logs,FRONTEND_URL=https://chatbot-frontend-aljdeea7va-uc.a.run.app

After deployment, copy the Backend URL.

2. Deploy Frontend (Next.js)

cd ../frontend
# Replace [BACKEND_URL] with the actual URL from step 1
gcloud run deploy chatbot-frontend `
  --source . `
  --region us-central1 `
  --allow-unauthenticated `
  --set-env-vars NEXT_PUBLIC_API_URL=https://chatbot-backend-369742266618.us-central1.run.app