Hello everyone, I'm looking for advice on the bes...
# community-help
a
Hello everyone, I'm looking for advice on the best way to deploy Typesense on Google Cloud Platform. I'm most familiar with Cloud Run so currently I'm deploying it with a Cloud Storage bucket mounted as a file system. Besides some strange writing errors that
--reset-peers-on-error
fixed, it seems to work. I'm wondering if Computer Engine VM is the proper way to go about this.
Copy code
gcloud beta run deploy typesense `
  --image="typesense/typesense:29.0" `
  --region=$env:REGION `
  --execution-environment="gen2" `
  --cpu="2" 
  --memory="4Gi" 
  --port="8108" `
  --service-account="$($env:SERVICE_ACCOUNT)@$($env:PROJECT).<http://iam.gserviceaccount.com|iam.gserviceaccount.com>" `
  --allow-unauthenticated `
  --set-secrets="TYPESENSE_API_KEY=$($env:SECRET):latest" `
  --add-volume="name=data,type=cloud-storage,bucket=$($env:BUCKET)" `
  --add-volume-mount="volume=data,mount-path=/mnt/data" `
  --args="--data-dir=/mnt/data,--enable-cors,--reset-peers-on-error" `
  --concurrency="40" `
  --max-instances="1" `
j
AFAIK Google Cloud Run doesn’t offer persistent storage or memory, both of which Typesense needs. So I’d recommend running Typesense on regular Linux VMs on GCP
👍 1