第4å capify
2008/03/27
ä»åã¯ãRails ã¢ããªã±ã¼ã·ã§ã³ããããã¤ã¡ã³ãããæºåã
以ä¸ãããªãã® Rails ã¢ããªã±ã¼ã·ã§ã³ã®ååã ballad ã¨ããã
ã¾ããæ¬çªãµã¼ãã®ãã¹ãåã alpha.oiax.jp ã¨ãããããã¤å
ã®ãã£ã¬ã¯ããªã /var/rails/ballad/ ã¨ããã
Subversion ã¬ãã¸ããªã® URL 㯠https://repository.oiax.jp/svn/ballad/trunkã
ãªãããããã®ãã¹ãåãURL ã¯ãã¹ã¦æ¶ç©ºã®ãã®ã§ããã
ballad ã¢ããªã±ã¼ã·ã§ã³ã®ã«ã¼ããã£ã¬ã¯ããªã«ç§»åãã¦ãã³ãã³ã capify .
ãå
¥åã
% capify . [add] writing `./Capfile' [add] writing `./config/deploy.rb' [done] capified!
çæããããã¡ã¤ã«ã®ä¸ã¤ Capfile ã®ä¸èº«ã¯æ¬¡ã®éãã ãããã®ãã¡ã¤ã«ã¯åºæ¬çã«æ¸ãæããªãã
load 'deploy' if respond_to?(:namespace) # cap2 differentiator Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } load 'config/deploy'
config ãã£ã¬ã¯ããªã«çæããã deploy.rb ãã¡ã¤ã«ã®åæç¶æ ã¯ã次ã®éãï¼
set :application, "set your application name here" set :repository, "set your repository location here" # If you aren't deploying to /u/apps/#{application} on the target # servers (which is the default), you can specify the actual location # via the :deploy_to variable: # set :deploy_to, "/var/www/#{application}" # If you aren't using Subversion to manage your source code, specify # your SCM below: # set :scm, :subversion role :app, "your app-server here" role :web, "your web-server here" role :db, "your db-server here", :primary => true
ãããã次ã®ããã«æ¸ãæããã
set :application, "ballad" set :repository, "https://repository.oiax.jp/svn/ballad/trunk" set :deploy_to, "/var/rails/#{application}" set :user, "app" set :use_sudo, false role :app, "alpha.oiax.jp" role :web, "alpha.oiax.jp" role :db, "alpha.oiax.jp", :primary => true
set :user, "app"
ã§ããªã¢ã¼ããã¹ãã« SSH ã§ãã°ã¤ã³ããã¦ã¼ã¶ã¼ã app ã«è¨å®ãã¦ãããä»ã®ã¦ã¼ã¶ã¼ï¼ä¾ãã°ãrailsï¼ã使ã£ã¦ããå ´åã¯ãæ¸ãæããã
ãã®æ¬¡ã®è¡ã®ãset :use_sudo, false
ã¯ãRails ã¢ããªã±ã¼ã·ã§ã³ã®èµ·åæçã« sudo ã使ããã©ãããå¶å¾¡ããå¤æ°ãæã
ã®ä¾ã§ã¯ãapp ã¦ã¼ã¶ã¼ã§èµ·åããã®ã§ãfalse
ã«ãã¦ããã
[æ¹è¨] 2008/05/17 ã¦ã¼ã¶ã¼ app ã§ãªã¢ã¼ããã¹ãã«ãã°ã¤ã³ããæ¹å¼ã«åããã¦è¨è¿°ãä¿®æ£ã