On Wednesday, January 4, 2012 at 7:15 PM, Tim Uckun wrote:
Hey all I am trying to deploy a rails app. I was going to use theapplication cookbook but decided to try and go at it myself. I havegotten to the stage where it checkout the source code and handles thesubmodules but the symlinking doesn't seem to be working properly.Specifically the log symlink. Instead of symlinking the log directoryit creates a log symlink inside of the log directory which would meanthe logs would have to be in RAILS_ROOT/log/log/production.log Isthis a bug in the deploy resource?BTW....What do you guys think about putting a deploy.rb someplace andshelling out to cap deploy?Here is the recipe so farapp_path = "#{app[:path]}/#{app[:environment]}"%w(bundle cached-copy config log pids system).each do |dir|directory app_path doowner app[:user]group app[:user]mode "0755"action :createrecursive trueendend%w(bundle cached-copy config log pids system).each do |dir|directory "#{app_path}/shared/#{dir}" doowner app[:user]group app[:user]mode "0755"action :createrecursive trueendend#has other dependencies...deploy app_path dorepo app[:repo]revision app[:revision]user app[:user]enable_submodules truemigrate falsemigration_command "bundle exec rake db:migrate"environment "RAILS_ENV" => "production", "OTHER_ENV" => "foo"shallow_clone truecreate_dirs_before_symlink %w{log config pids system tmp}action :deploy # or :rollbackrestart_command "touch tmp/restart.txt"scm_provider Chef::Provider::Git # is the default, for svn:Chef::Provider::Subversionend
Archive powered by MHonArc 2.6.16.