buildpack-nginx icon indicating copy to clipboard operation
buildpack-nginx copied to clipboard

Cache nginx debs

Open jgallen23 opened this issue 11 years ago • 6 comments

this will speed up deployment a bit

jgallen23 avatar May 16 '14 17:05 jgallen23

ping :)

jgallen23 avatar Jun 20 '14 17:06 jgallen23

Thanks for the PR, and apologies for the wait..

Is there a way to do the version check in a more automated fashion? i.e.:

  • Mark when apt-get update was last run as well as current version of nginx
  • If apt-get update wasn't run in the last $x (24h?), run it
  • Check if there's a newer version available (via apt-cache?) and download new packages

It would allow nginx to be updated automatically and not get stuck behind me/someone updating this buildpack or someone waiting for the a newer buildstep to be published

ghost avatar Jun 20 '14 17:06 ghost

yeah. I can look into that. I figured nginx isn't updated all that often, so it would be ok and worst case they could delete the cache directory on the box if they wanted latest.

jgallen23 avatar Jun 20 '14 17:06 jgallen23

Hm, on second thought I'm OK with that.

Could you change lines 5-7 to be independent of versions? Something like $CACHEDIR/nginx_*.deb (etc) could work

ghost avatar Jun 20 '14 18:06 ghost

great idea. I'll make that change later today

jgallen23 avatar Jun 20 '14 18:06 jgallen23

Thanks!

ghost avatar Jun 20 '14 18:06 ghost