Let the supervisor deploy static files


#1

Is there a way to deploy static files using a habitat supervisor (which then will be served by nginx or the like)? In contrast to this blog post which requires to apply a config to deploy new files.

I would like have static files deployed like I am deploying an application right now: By pushing it to the unstable channel and then promoting it to the stable channel.

Is there a way other than creating a single package which contains nginx + static files?

The run hook seems to be biggest problem right now. Probably I could use polling within the run hook like it is shown in the .net tutorial. However, that does seems a little like a dirty workaround. Isn’t there a better way?


#2

The right way is to create a package for your static files, depend on Nginx, and run it.


#3

@adam thank you. that looks good.

Would probably be good to update the blog on the habitat website, as the info there is kind of misleading/outdated