Want to write their own ruby code, side deployment at any time to look around, Heroku domain name is not friendly, speed in the country and slow. So think up Capistrano, then learn ...
Capistrano a little bit of introductory cognition
Https://www.evernote.com/shard/s6/sh/72a2b7c8-d531-4efc-9e16-ac82af2a92b7/e54fca8a9e7014ad87c79e7a7a5538c4
Capistrano new version of the installation
http://capistranorb.com/documentation/getting-started/preparing-your-application/
http://capistranorb.com/
# Deploy in Gemfile
Gem ' Capistrano ', ' ~> 3.2.0 '
The installation can be completed. and generate Capfile and so on ...
$bundle Exec Cap Install
Specific configuration:
$vim config/deploy/production.rb
# # Content
One server ' qzi.me ', roles: [:d emo], port:1234, User: ' Qzi '
Task:uptime do |host|
Over roles (:d emo), in::p arallel do
Uptime = Capture (: uptime)
hostname = Capture (: hostname)
Puts "#{hostname} reports: #{uptime}"
End
End
$ cap Production uptime
Better wording:
$vim config/deploy/production.rb
Server ' qzi.me ', roles: [:d emo], port:1234, User: ' Qzi '
$ vim Lib/capistrano/tasks/test.rake
Desc "Check the uptime on the host"
Task:uptime do |host|
On roles (:d emo), in::p arallel do
Uptime = Capture (: uptime)
hostname = Capture (: hostname)
Puts "#{hostname} reports: #{uptime}"
End
End
$cap-T # to find your new command.
SSH itself first free RSA password login. This is off-topic, can Baidu;
There is the rails project how to deploy to explain the other to learn, for example, passenger, unicorn, etc. are not very difficult;
Of course, you have to have a host, domain names and the like;
Let's do this on a temporary basis. Host landing and Operation commands have been point to, later put the notes again through with some hit together ...
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
Iterative edge deployment using Capistrano and writing Ruby