Deploying an app that exists in a git repo subdir

84 views
Skip to first unread message

Ryan

unread,
Dec 15, 2008, 2:29:56 PM12/15/08
to Capistrano
Hi,

I have a git repo for a project that involves a couple web apps, and a
bunch of other non-web app code. So at the top level of my git repo I
have web/ and then web/dfr and web/sammich. I'd like to be able to
capify the individual apps and deploy them independently. It doesn't
look like cap supports this out of the box. Has anyone ever ran into
this?

Thanks,
Ryan

Jamis Buck

unread,
Dec 15, 2008, 2:47:14 PM12/15/08
to capis...@googlegroups.com
It's not so much cap, as git. Git doesn't let you check out just
subdirectories of a project. If you want to be able to deploy just a
subdirectory, you'll need to write your own tasks that (1) check out the
entire project, (2) tar/gz the subdirectory in question, and (3) pushes
that archive to the remote servers and installs it.

- Jamis

Ryan

unread,
Dec 15, 2008, 3:08:37 PM12/15/08
to Capistrano
Yeah that was my first thought, just wanted to check with you guys
first.

Thanks!
Ryan

David Masover

unread,
Dec 17, 2008, 1:04:03 PM12/17/08
to capis...@googlegroups.com
Another possibility would be to tweak the remotecache-style tasks to push the entire project to the cache, then copy just the appropriate subdirectory to the release dir.

I'm not sure which is easier, but that would probably be more bandwidth-efficient, if you deploy a lot of those projects to the same server.
Reply all
Reply to author
Forward
0 new messages