GithubHelp home page GithubHelp logo

nginx-cookbook's People

Contributors

auser avatar cmer avatar cmw avatar gerhard avatar honeybagder avatar iceberg901 avatar jcldavid avatar mlen avatar thedeveloper avatar tilo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nginx-cookbook's Issues

No config files being copied?

Hi, I'm using your cookbook on a vagrant VM with a Debian distro, it doesn't seem to put any conf file to any of the config directory.

my config:

config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "cookbooks"
    chef.log_level = :debug
    # chef.roles_path = "../my-recipes/roles"
    # chef.data_bags_path = "../my-recipes/data_bags"
    # chef.add_recipe "chef-nodejs"
    chef.add_recipe "apt"
    chef.add_recipe "build-essential"
    # chef.add_recipe "php-fpm"
    # chef.add_recipe "git"
    # chef.add_recipe "curl"
    # chef.add_recipe "php"
    # chef.add_recipe "php5-imagemagick"
    chef.add_recipe "nginx::source"
    # chef.add_recipe "mongodb"
    # chef.add_role "web"

    # You may also specify custom JSON attributes:
    chef.json = {
      :nginx => {
        :apps => {
          :paste => {
            :listen => [3000],
            :server_name => 'paste.dev',
            :public_path => '/home/vagrant/html/paste.dev/public',
            :try_files => [
              '$uri', '$uri/', '@php'
            ],
            :locations => [
              :path => '@php',
              :directives => [
                'fastcgi_pass   unix:/var/run/php-fpm/www.sock;',
                'include fastcgi_params;',
                'fastcgi_param  SCRIPT_FILENAME $document_root/index.php;'
              ]
            ]
          }
        }
      }
    }
  end

Use ohai

Instead of relying on :

:nginx => {
  :distribution => 'precise',

use in your recipe:

node[:lsb][:codename]

Multiple apps per instance

Hi,

I'm sorry if this is a stupid question, but I'm just starting with Chef, and I'd like to deploy multiple apps to the same EC2 instance. The way I see it is that Chef would add a vhost for each app I have, and automatically set them up when the recipe is ran. Does this cookbook support such scenario?

Thanks a lot,

  • Marcelo.

Source URL is wrong

Should be:

source "http://nginx.org/download/nginx-#{node[:nginx][:version]}.tar.gz"

Service declaration must be before compilation

service "nginx" do
  supports :status => true, :restart => true, :reload => true
  action :enable
end

bash "compile_nginx_source" do
  cwd "/usr/local/src"
  code <<-EOH
    tar zxf nginx-#{node[:nginx][:version]}.tar.gz
    cd nginx-#{node[:nginx][:version]} && ./configure #{configure_flags}
    make && make install
  EOH
  creates node[:nginx][:binary]
  notifies :restart, resources(:service => "nginx")
end

do not hardcode nginx version

since the cookbook should work across nginx versions, it'll make sense to set the version as default value (not implicitly)

default[:nginx][:version] = "1.2.4"

so we can override this value with

node.set[:nginx][:version] = "1.2.6"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.