Installs passenger with Nginx, using the Phusion PPA.
Requires Chef 0.10.10+ and Ohai 0.6.10+ for platform_family
attribute use.
Tested on the following platforms:
- Ubuntu 12.04, 14.04
Opscode cookbooks:
- apt
- build-essential
- nodejs
Other cookbooks:
node['nginx']['user']
- Defaults towww-data
.node['nginx']['dir']
- Defaults to/etc/nginx
.node['nginx']['log_dir']
- Defaults to/var/log/nginx
.node['nginx']['worker_processes']
- Defaults to4
.node['nginx']['worker_connections']
- Defaults to768
.node['nginx']['default_site_enabled']
- Defaults totrue
.node['rails']['application']
- Defaults toapp
.node['rails']['rails_env']
- Defaults toproduction
.node['rails']['group']
- Defaults towww-data
.
Installs passenger from the Phusion PPA. Usually not used directly, because the recipe is included in the passenger_nginx
resource.
The passenger_nginx
LWRP configures Nginx with Passenger.
name
- Name of the application. Used to construct the document root at/var/www/NAME/current/public
rails_env
- Rails enviroment used by Passenger. Defaults toproduction
.owner
- Owner for application folder. Defaults towww-data
.group
- Group for application folder. Defaults towww-data
.default_server
- Whether the application is the default server when multiple virtual hosts are present. Defaults totrue
.
For example, to run a Rails application on passenger:
passenger_nginx "myproj" do
rails_env "production"
end
- Author: Martin Fenner (mfenner@plos.org)
Copyright: 2014, Public Library of Science
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.