default :deploy_to location

1 view
Skip to first unread message

shaan

unread,
May 29, 2009, 5:13:21 PM5/29/09
to deprec - deployment recipes for capistrano
I am using capistrano 2.5.5 and deprec 2.0.9.
I noticed that I was the only one for whom the deploy_to location was /
opt/apps/... instead of /u/apps. And then I found that it is because I
use deprec in my company.
I am sure there is a reason why deprec chose to be different. Can
somebody share some light?

Mike Bailey

unread,
May 30, 2009, 1:41:45 AM5/30/09
to deprec - deployment recipes for capistrano
God question. You've stumbled across a problem that no-one's reported
in almost three years but it's quite valid.

The quick solution is to add the following to your deploy.rb:

set :deploy_to, "/u/apps/#{application}"

The long answer is that at first, deprec used /var/www/apps because it
was where one might expect to find web apps. This was changed to /opt/
apps/ when deprec started installing the apache package instead of
compiling from source.

Capistrano puts this in generated deploy.rb files when you run
"capify ."

# 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}"

Deprec puts this in generated deploy.rb fileswhen you run "depify ."

# If you aren't deploying to /opt/apps/#{application} on the target
# servers (which is the deprec default), you can specify the actual
location
# via the :deploy_to variable:
# set :deploy_to, "/opt/apps/#{application}"

It would have been cleaner to have explicitly set :deploy_to in the
deploy.rb deprec generates
rather than update the value within the library and show where in
deploy.rb it can be reset.

This would avoid the problem you've encountered when deploying using a
non-deprec generated depoy.rb
I'll note that for fixing.

- Mike

shaan

unread,
May 30, 2009, 6:47:23 PM5/30/09
to deprec - deployment recipes for capistrano
I am not sure but doesn't capistrano default to /u/apps/#{application}
when :deploy_to is not defined. If so, why not reuse that...

Pritesh Mehta

unread,
Jun 1, 2009, 2:49:32 AM6/1/09
to deprec...@googlegroups.com
Shaan,
deprec is designed to deploy to an ubuntu server, (although it is possible to deploy to other ditributions). The /u/apps/ path is not native to ubuntu or any FHS compliant distro iirc. 

It makes sense to for it to use a sensible default for an ubuntu server setup. It is obviously easy enough to change this to whatever suits your needs.

more info on  th FHS available here: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

HTH
Reply all
Reply to author
Forward
0 new messages