Google Cloud
PMTiles can be served from a Cloud Run container using the go-pmtiles Docker image.
Cloud Storage
Service Account
Creating a Cloud Run container
In the Cloud Run console, choose Create Service.
Choose Deploy one revision from an existing container image.
Specify the Container image URL
protomaps/go-pmtiles:latest
.Choose a descriptive Service name like
protomaps-demo
.Select the same Region as your Cloud Storage bucket.
Select Allow unauthenticated invocations.
For CPU Allocation Service Autoscaling, leave the defaults (only allocated during processing + 0 minimum instances).
Under Container(s), Volumes, Networking, Security:
Leave the default container port (8080).
Leave the container command blank (default entry point)
Specify the arguments:
serve . --bucket=gs://BUCKET --cache-size=500 --public-url=https://example.com
replacingBUCKET
with the name of your bucket andhttps://example.com
with your custom domain.Set
Memory
to 1 GiB.Change Execution Environment to 2nd Generation.
Set Maximum Number of Instances to 1.