UI for checking potential wildfires generated by detection code in firecam repo.
checkfire runs on Cloud Run as a single always-warm instance. The container is built from the Dockerfile, which builds the app inside the image — you do not need to run npm run build yourself before deploying.
gcloudCLI authenticated against the target project (gcloud auth login)- Docker
- Access to the project's container registry (
gcr.io/<project-id>)
export PROJECT=oct-p1 # change if deploying to another project
export REGION=us-west1
gcloud auth configure-docker gcr.ioAlways deploy a tagged image (the git SHA). Deploying an untagged/latest image with the same tag as the running revision is a no-op — no new revision gets created.
export IMAGE=gcr.io/$PROJECT/checkfire:$(git rev-parse --short HEAD)
docker build -t $IMAGE .
docker push $IMAGE
sed "s|IMAGE_URL|$IMAGE|g" cloudrun.yaml | \
gcloud run services replace - --region=$REGIONcloudrun.yaml is the source of truth for the service configuration: 1 warm instance (required for the long-lived SSE stream and the Pub/Sub pull subscription), gen2 execution environment, Cloud SQL Auth Proxy, CPU always allocated, 3000 s request timeout, and the OCT_FIRE_SETTINGS env var.
If you prefer not to use the YAML, gcloud run deploy is equivalent — the full one-liner is in the header comment of cloudrun.yaml.
cloudrun.yaml hardcodes several oct-p1-specific values that sed does not substitute. Update these by hand:
run.googleapis.com/cloudsql-instances— Cloud SQL instance connection nameserviceAccountName— runtime service accountOCT_FIRE_SETTINGS— path to the config JSON in that project's bucket
gcloud run services describe checkfire --region=$REGION --format='value(status.url)'
curl -sS -o /dev/null -w '%{http_code}\n' "$(gcloud run services describe checkfire --region=$REGION --format='value(status.url)')/"The root path (/) returns 200 and is also used as the liveness and startup probe.
Requires Node 24 (see .nvmrc).
npm install
npm run dev # ts-node + Next.js dev server on :3141npm run build compiles the server to dist/ and builds .next/. You need it for npm start (which runs node dist/server-main.js) and for npm test, but not for a Cloud Run deploy — the Dockerfile runs it in the builder stage.
The code in this repository is released under Apache License 2.0.