config.toml: |
[webserver]
port = ":8080"
[webserver.headers]
Cache-Control = "s-maxage=3600"
[cache]
# required
type="gcs"
bucket="bucket-name" # Bucket is the name of the GCS bucket to operate on
# optional
basepath="tegola" # Basepath is a path prefix added to all cache operations inside of the GCS bucket
#max_zoom=8 # MaxZoom determines the max zoom the cache to persist.
[[providers]]
name = "xxx"
type = "mvt_postgis"
uri = "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DATABASE}" # PostGIS connection string (required)
srid = 4326
[[providers.layers]]
name = "layer1"
geometry_fieldname = "geometry"
geometry_type="linestring"
id_fieldname = "id_tegola"
sql = "SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id_tegola FROM route WHERE geometry && !BBOX!"
[[maps]]
name = "xxx"
center = [15.0982, 50.7374, 7.0] # set the center of the map
[[maps.layers]]
provider_layer = "xxx.layer1"
min_zoom = 1
max_zoom = 20
I believe @matheusmatos is the author on this cache provider. I don't generally work with GCP so I don't have much insight. Let's see if they chime in.
tegola v0.19.0 with gcs storage cache got lot of errors
config