developmentseed / cogeo-mosaic-tiler

Serve Map tile from Cloud Optimized GeoTIFF mosaics.
MIT License
12 stars 6 forks source link

Expose optional image time-to-live #2

Closed kylebarron closed 4 years ago

kylebarron commented 4 years ago

Not sure if this PR interests you, feel free to not merge if not.

This just exposes --img-ttl in the serverless.yml config, which is read as an environment variable to be passed to lambda-proxy.

kylebarron commented 4 years ago

This would need to be updated to use the new cache-control option in lambda-proxy

vincentsarago commented 4 years ago

sorry I'm not sure why I didn't get the notification. I think as I mentioned in rio-tiler is that cogeo-layer aws lambda layer/docker images will need to be updated before we can deploy this safely.

vincentsarago commented 4 years ago

thought about the pr, maybe it will make sense to create a configuration file a bit like in https://github.com/developmentseed/titiler/blob/master/titiler/core/config.py

kylebarron commented 4 years ago

sorry I'm not sure why I didn't get the notification

You might've turned off notifications for this repo? Check "Watch" at the top.

cogeo-layer aws lambda layer/docker images will need to be updated before we can deploy this safely

You have a dependency on lambda-proxy in both the local bundle and in the lambda layer. I'm not sure what happens if they're different versions.

https://github.com/developmentseed/cogeo-mosaic-tiler/blob/de15c97aa1f612a45c5200a0a13e8039d330a079/setup.py#L7

https://github.com/kylebarron/cogeo-layer/blob/079156ec9d1e8aaf07124622da4a99977234c0dc/requirements-gdal3.0.txt#L1

vincentsarago commented 4 years ago

You have a dependency on lambda-proxy in both the local bundle and in the lambda layer. I'm not sure what happens if they're different versions.

Yes, just to make sure we can tests the repo localy and in CI. I'm just saying that it we makes change in this repo we better make change in the layer because if you try to pass a route with cache_control=... using https://github.com/developmentseed/cogeo-mosaic-tiler/blob/master/serverless.yml#L43 it won't work

kylebarron commented 4 years ago

Well when rio-tiler 2.0 comes out, that's probably a good time to make a new layer.

vincentsarago commented 4 years ago

sure but this won't be soon 🤔, We can still publish a new layer with lambda-proxy 5.1 tho.

Using lambda layer makes things really easy to deploy but the versioning is a pain!

kylebarron commented 4 years ago

I'll make a new PR adding an optional cache-control arg.

maybe it will make sense to create a configuration file a bit like in

I think for now having a configuration file is overkill, especially since serverless.yml essentially already is a config file