Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

capistrano-simple-nginx

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capistrano-simple-nginx

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Capistrano::SimpleNginx

Support for Capistrano 3.x

Installlation

Add this line to your application's Gemfile:

gem 'capistrano'
gem 'capistrano-simple-nginx', '~> 0.0.1'

And then run:

$ bundle

Or install it yourself as:

$ gem install capistrano-simple-nginx

Usage

Require in Capfile:

require 'capistrano/simple-nginx'
  • Generate file config nginx, run:
$ cap production nginx:setup
  • start|stop|restart nginx, run:
$ cap production nginx:start
$ cap production nginx:stop
$ cap production nginx:restart

You need add directory to sock file of app. Example using unicorn for app:

# in config/deploy.rb
set :nginx_upstream_file, "/tmp/unicorn.sock"

Default config

    set :nginx_listen_port, 80 #listen_port
    set :nginx_server_name, "_" #server_name
    set :nginx_upstream_name, -> { "#{fetch(:application)}" } # upstream name
    set :nginx_config_name, -> { "#{fetch(:application)}_#{fetch(:stage)}" } #file name config
    set :nginx_fail_timeout, 0
    set :nginx_access_log_file, -> { "/var/log/nginx/#{fetch(:nginx_config_name)}.access.log" } # access log file
    set :nginx_error_log_file, -> { "/var/log/nginx/#{fetch(:nginx_config_name)}.error.log" } # error log file
    set :nginx_upstream_file, -> { "/tmp/#{fetch(:application)}.sock" } # .sock file path

FAQs

Package last updated on 23 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc