Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elquimista/dploy-rails
Simple Rails deployer for VPS and Nginx (or similar reverse proxy server)
https://github.com/elquimista/dploy-rails
nginx rails-deployer ruby ruby-on-rails
Last synced: 28 days ago
JSON representation
Simple Rails deployer for VPS and Nginx (or similar reverse proxy server)
- Host: GitHub
- URL: https://github.com/elquimista/dploy-rails
- Owner: elquimista
- License: apache-2.0
- Created: 2017-09-04T11:40:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-12T22:58:15.000Z (over 6 years ago)
- Last Synced: 2024-12-18T21:39:52.126Z (30 days ago)
- Topics: nginx, rails-deployer, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dploy-rails
Simple Rails deployer for VPS and Nginx (or similar reverse proxy server) for Rails 5.1 and above.
## Prerequisites
`dploy-rails` assumes the following things:
- Your Rails application is set to run on top of nginx in the remote server. For more details, please read this article here - [How to Setup Rails App with Puma and NGINX](http://artificis.gitlab.io/development/2017/02/03/how-to-setup-rails-app-with-puma-and-nginx.html)
- Rails application codebase is hosted on certain git repository service and deploy key (SSH-key used for read-only purpose) is added to the repository.
- You have `build` script inside `package.json` file.
E.g.,
```
"build": "sh -c 'rm -rf public/webpack/production/* || true && bin/rails react_on_rails:locale && bin/rails assets:precompile && yarn webpack:build:production'"
```
- You have `start` script inside `package.json` file.
E.g.,
```
"start": "bundle exec puma -e $RAILS_ENV -p $PORT -b unix://./tmp/sockets/puma.sock --pidfile ./tmp/pids/puma.pid -d"
```
- You use bash on the remote server.
- In `.bashrc` file, following lines must be commented out if present:
```
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
```## Installation
Add this line to your application's Gemfile:
```ruby
gem 'dploy-rails'
```And then execute:
$ bundle
## Usage
In order for `dploy-rails` to work properly, you need to set the following env variables:
```
DEPLOY_DOMAIN=
DEPLOY_USER=
DEPLOY_IDENTITY_FILE=
DEPLOY_PATH=
```This gem will make a new Rails task available. Once you are ready to deploy, just hit the following command in your terminal:
$ bin/rails deploy
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/knocknock-team/dploy-rails.