Giter VIP home page Giter VIP logo

capistrano-php-fpm's Introduction

Capistrano PHP-FPM

Official Capistrano extension for PHP-FPM tasks. This replaces 1.0.0 of https://rubygems.org/gems/capistrano-fpm. It differs greatly in configuration.

Environments Supported

systemd sysv & upstart
capistrano/php_fpm/systemd capistrano/php_fpm/sysv_upstart

Installation

Add this line to your application's Gemfile:

gem 'capistrano', '~> 3.2'
gem 'capistrano-php-fpm'

Usage

Require one of the above 'Environments Supported' in your Capfile:

require 'capistrano/php_fpm/sysv_upstart'

capistrano/php_fpm comes with 5 tasks:

  • php_fpm:reload
  • php_fpm:restart
  • php_fpm:stop
  • php_fpm:start
  • php_fpm:zap

You can execute the task on command line:

cap production php_fpm:reload

And configure it on your deploy.rb file:

namespace :deploy do
  after :finishing, 'php_fpm:reload'
  after :rollback, 'php_fpm:reload'
end

Configuration

Configurable options shown here are also the defaults:

set :php_fpm_with_sudo, true
set :php_fpm_roles, :web
set :php_fpm_service_name, 'php-fpm' # Change this if you have non-standard naming for the php-fpm service
set :php_fpm_service_suffix, '.service' # Only used for systemd environment, change this if your service name is not sufixed by this
set :systemctl_location, '/bin/systemctl' # May already exist if you use other plugins. Be sure to check your config/deploy/{env} file

More Capistrano automation?

Check out capistrano-plugins github org.

Contributing and bug reports

Contributions and improvements are very welcome.

If something is not working for you, or you find a bug please report it.

Thanks

License

MIT

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.