https://github.com/elia/capistrano-uwsgi
Configuration and managements capistrano tasks for uWSGI
https://github.com/elia/capistrano-uwsgi
Last synced: 5 months ago
JSON representation
Configuration and managements capistrano tasks for uWSGI
- Host: GitHub
- URL: https://github.com/elia/capistrano-uwsgi
- Owner: elia
- License: mit
- Created: 2013-10-16T13:26:20.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-02-10T17:11:50.000Z (over 12 years ago)
- Last Synced: 2024-12-28T03:51:58.927Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 152 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Capistrano::Uwsgi
This gem provides two capistrano tasks:
* `uwsgi:setup` - creates `/etc/uwsgi/apps-enabled/#{application}-#{stage}.ini`
* `uwsgi:restart` - touches `uwsgi_ini` (see below)
And uWSGI configuration file generator, that will create local copy of default uWSGI config for customization.
## Installation
Add this line to your application's Gemfile:
gem 'capistrano-uwsgi'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-uwsgi
## Usage
Add this to your `config/deploy.rb` file:
require 'capistrano/uwsgi/tasks'
Make sure, following variables are defined in your `config/deploy.rb`:
* `application` - application name
* `stage` - the stage (usually from `capistrano/ext/multistage`)
* `user` - remote user name
* `group` - remote group name
* `rack_env` - RACK_ENV used to run the app
* `deploy_to` - deployment path
* `uwsgi_mode` - can be either `:standalone` or `:emperor`
* `app_port` - application port (required by the `:standalone` mode)
* `rvm_path` - set this var to enable rvm usage inside uWSGI (optional)
* `uwsgi_ini` - the path of the _compiled_ uwsgi.ini config file (optional, defaults to: `/etc/uwsgi/apps-enabled/#{application}-#{stage}.ini`)
Launch new tasks:
$ cap uwsgi:setup
$ cap uwsgi:restart
Or you can add hook to call this tasks after `deploy:setup`. Add to your `config/deploy.rb`:
after 'deploy:setup', 'uwsgi:setup', 'uwsgi:restart'
If you want to customize uWSGI configuration, just generate local uWSGI config before running `uwsgi:setup`:
$ rails generate capistrano:uwsgi:config
And then edit file `config/uwsgi.ini.erb` as you like.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## Credits
Original project structure and README from [Ivan Tkalin's capistrano-nginx](https://github.com/ivalkeen/capistrano-nginx).