Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the supermarket mailing list.

Select Badges

Select Supported Platforms


application_static (2) Versions 0.3.0

Installs/Configures application_static

cookbook 'application_static', '~> 0.3.0'
cookbook 'application_static', '~> 0.3.0', :supermarket
knife cookbook site install application_static
knife cookbook site download application_static

application_static cookbook


This is the simple chef cookbook to quick host static web sites with nginx. Based on excellent application cookbook, which is only providing LWRPs, this cookbook actually has recipe.

So after defining it with Berkshelf/Librarian, you have to provide as minimal config as possible, to make your sites working.


Let's imagine you have several static websites, you want to host, each in it's own repository: -> ->

To get them running, you should do 3 steps.

1. Adding cookbook

First thing to do, is adding application_static cookbook to your chef installation.
Berkshelf example:

cookbook "application_static"

2. Create role

Then create appropriate role:

  "name": "static_sites",
  "override_attributes": {
    "nginx": {
      "default_site_enabled": false,
      "install_method": "repo"
    "application_static": {
      "apps": [
          "name": "",
          "url": "",
          "enabled": true
          "name": "",
          "url": "",
          "enabled": true
      "deploy_key" : "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA38rGcWTe5Iux2MtIgmbl08P0f3KZfJBCIvKES9oFFglqAbI7\n...........\n5qJkpABldGtXpWxrllpFvWDGSWdv8WYJW308dXIp2C5LjE3saTuhBTgain7GDs6P\np5lXlrB0zUGU92likbgEvIFN0lzkpYt02ccxTCCU6bIa9pTI3IBK\n-----END RSA PRIVATE KEY-----"
  "run_list": [

Note, that you shouldn't really store private key in role file, in favor of databags or even better encrypted databags.
Also, if you getting troubles with multiline private key, use this tip.

3. Apply role

knife node run_list add NODE_NAME role[static_sites]

That's basically it. After adding this role to node's run-list, your sites should be up and running.
This cookbook was tested on Ubuntu 14.04 LTS, but there is nothing os/platform/version specific, so it should work on any environment.
Pull-requests are very warm welcome.

Dependent cookbooks

nginx >= 0.0.0
application >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

application_static changelog

0.3.0 (26.11.2014)

  • Hide .git folder and .gitignore file from nginx index.
  • Explicitly specify tested os (ubuntu).
  • README updates
  • CHANGELOG file

0.2.0 (25.11.2014)

Initial release.

Foodcritic Metric

0.3.0 passed this metric