3

I'm using Chef to deploy a rails server. I'm storing my code in a git repository, but it's not the only item in the repository, it's in a subfolder

repo/
 project-files/
 more-project-files/
 rails-app/

Chef's deploy seems great, but it doesn't allow me to deploy from the subfolder (at least natively) Is there a clever way of doing this, or am I stuck using `execute' to run the rake tasks myself?

Rob Guderian
  • 528
  • 4
  • 11
  • As far as I can tell, capistrano can get and deploy a git repository, but not get a _subfolder_ from a git repository and deploy that. The rails app must be in the root folder, not a subfolder. – Rob Guderian Jun 25 '12 at 19:28
  • Check this answer: http://stackoverflow.com/questions/29168/deploying-a-git-subdirectory-in-capistrano/2047574#2047574 This works! – raghu May 13 '14 at 07:20

1 Answers1

1

Decided to check out the entire project to a folder, and use symlinks to link in the folders we needed.

If we need to, we could use the Git built-in 'partial checkout' stuff, but we'd have to issue the command through execute instead of deploy. We'll investigate further if the project requires, but this works for now. Too bad that Chef's deploy doesn't have that functionality.

Rob Guderian
  • 528
  • 4
  • 11