Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

3.4 KB
Raw Blame
# Cloud Build -> Cloud Run for the pump-claims GitHub fee-PDA claim listener.
#
# Long-lived WebSocket subscription to the PumpFees program, so it cannot run
# as a request/response Cloud Run function. Deployed with --no-cpu-throttling
# and --min-instances=1 so the subscription stays alive between health probes.
# Build context is the REPO ROOT (the Dockerfile COPYs api/_lib and src/pump).
#
#   gcloud builds submit --config services/pump-claims/cloudbuild.yaml .
#
# Runtime config mirrors three-ws-api: the DATABASE_URL secret (the same Neon
# database api/_lib/pump-claims.js reads for the table-first path) and the
# pinned three-ws@ runtime service account (the project's default compute SA
# was deleted, so an unpinned deploy fails). SOLANA_RPC_URL is set directly
# (not a secret): it is the free `api.mainnet-beta.solana.com` lane, the only
# free lane docs/ops/solana-rpc-lanes.md measured serving logsSubscribe since
# MagicBlock's IP block, not a credential. If it throttles under a steady
# subscription, point it at a paid lane the same way other long-lived workers
# do (a dedicated secret, e.g. agent-mm-solana-rpc-url) with
# --update-env-vars, never --set-env-vars.

# Builds run as the pinned three-ws-build service account: the project's
# default compute service account was deleted, so an unpinned submit fails
# with "Unknown service account".
serviceAccount: projects/aerial-vehicle-466722-p5/serviceAccounts/[email protected]

# _REPO is the SHARED "workers" Artifact Registry repo other long-lived Node
# services (agora-citizens, agent-mm, agent-orders) publish into. Cloud Build
# does not create an Artifact Registry repo on demand, so a per-service repo
# name that has never been created fails the push step after a full build.
substitutions:
  _REGION: us-central1
  _SERVICE: pump-claims
  _REPO: workers
  _MIN_INSTANCES: "1"
  _MAX_INSTANCES: "1"

steps:
  - id: build
    name: gcr.io/cloud-builders/docker
    args:
      - build
      - --file
      - services/pump-claims/Dockerfile
      - --tag
      - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_SERVICE}:$SHORT_SHA
      - --tag
      - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_SERVICE}:latest
      - --cache-from
      - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_SERVICE}:latest
      - .
    timeout: 1800s

  - id: push
    name: gcr.io/cloud-builders/docker
    args:
      - push
      - --all-tags
      - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_SERVICE}

  - id: deploy
    name: gcr.io/google.com/cloudsdktool/cloud-sdk:slim
    entrypoint: gcloud
    args:
      - run
      - deploy
      - ${_SERVICE}
      - --image=${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_SERVICE}:$SHORT_SHA
      - --region=${_REGION}
      - --platform=managed
      - --no-cpu-throttling
      - --cpu=1
      - --memory=512Mi
      - --min-instances=${_MIN_INSTANCES}
      - --max-instances=${_MAX_INSTANCES}
      - --port=8080
      - --no-allow-unauthenticated
      - --service-account=three-ws@$PROJECT_ID.iam.gserviceaccount.com
      - --set-env-vars=SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
      - --set-secrets=DATABASE_URL=DATABASE_URL:latest

images:
  - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_SERVICE}:$SHORT_SHA
  - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_SERVICE}:latest

options:
  machineType: E2_HIGHCPU_8
  logging: CLOUD_LOGGING_ONLY