# Capistrano with Local (not file:///) repository

**URL:** <https://www.ruby-forum.com/t/capistrano-with-local-not-file-repository/64152>\
**Category:** Rails\
**Created:** [June 22, 2006, 3:28pm UTC](https://www.ruby-forum.com/t/capistrano-with-local-not-file-repository/64152 "2006-06-22T15:28:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 22, 2006, 3:28pm UTC](https://www.ruby-forum.com/t/capistrano-with-local-not-file-repository/64152/1 "2006-06-22T15:28:05Z")

</div>

I’m developing an rails app. The SVN repository resides on a (Win 2k)  
server on my company’s local intranet. The repository is accessed via  
http (Apache + mod\_dav\_svn). From this machine, it is not a problem to  
get out onto the Internet. However, coming in from the Internet is not  
possible (at least, not without a VPN connection).

Given this, is it possible to use Capistrano to deploy my application  
from the repository on the intranet to a production web server (a Linux  
box) on the Internet (i.e. NOT connected to the intranet)?

I have root (on the Linux box) and Administrator (on the subversion  
Win2K box) access, so my options are fairly flexible. Any thoughts are  
quite welcome!

Thanks!

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 23, 2006, 12:46am UTC](https://www.ruby-forum.com/t/capistrano-with-local-not-file-repository/64152/2 "2006-06-23T00:46:34Z")

</div>

Hey Will,

AFIK, if the production server cant access the repository, then  
deployment  
wont be possible without some hackery. Everything that I can think of  
(setting up a tunnel from production to repository) requires that you  
have  
to VPN in to the intranet.

If that is not a problem, then you can set up a tunnel from the  
production  
server to port 80 (or whatever Apache is sitting on) of the repository  
through your local machine(once you VPNed in from the local machine,  
ofcourse). Then you can set your repository path in your capistrano  
recipe  
as http://production\_server:forwarded\_port/repository/trunk

HTH  
~Rohith

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 23, 2006, 5:10am UTC](https://www.ruby-forum.com/t/capistrano-with-local-not-file-repository/64152/3 "2006-06-23T05:10:57Z")

</div>

I thought VPN’ing might be a solution.

Another thought:

- Export the app to a temp dir on my local workstation
- SCP the contents of the temp export
- Continue as normal (link current, etc.)

Perhaps I’ll look into this next week.

Rohith R. wrote:

> Hey Will,
> 
> AFIK, if the production server cant access the repository, then  
> deployment  
> wont be possible without some hackery. Everything that I can think of  
> (setting up a tunnel from production to repository) requires that you  
> have  
> to VPN in to the intranet.
> 
> If that is not a problem, then you can set up a tunnel from the  
> production  
> server to port 80 (or whatever Apache is sitting on) of the repository  
> through your local machine(once you VPNed in from the local machine,  
> ofcourse). Then you can set your repository path in your capistrano  
> recipe  
> as http://production\_server:forwarded\_port/repository/trunk
> 
> HTH  
> ~Rohith

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 23, 2006, 6:35am UTC](https://www.ruby-forum.com/t/capistrano-with-local-not-file-repository/64152/4 "2006-06-23T06:35:35Z")

</div>

I have a simple recipe for just this purpose at…

[http://blog.wolfman.com/articles/2006/05/26/capistrano-local-deploy-recipe](http://blog.wolfman.com/articles/2006/05/26/capistrano-local-deploy-recipe)

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 23, 2006, 7:30am UTC](https://www.ruby-forum.com/t/capistrano-with-local-not-file-repository/64152/5 "2006-06-23T07:30:52Z")

</div>

oo, I like!

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 24, 2006, 3:51am UTC](https://www.ruby-forum.com/t/capistrano-with-local-not-file-repository/64152/6 "2006-06-24T03:51:34Z")

</div>

You could use zip instead of tar in this case on a windows box.

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 23, 2006, 1:25pm UTC](https://www.ruby-forum.com/t/capistrano-with-local-not-file-repository/64152/7 "2006-06-23T13:25:21Z")

</div>

Cool!

Looks like I need to deploy from a \*nix or OS X box, though, as tar  
isn’t usually available on Windows systems.

That, or actually use my Cygwin install.

Thanks, Jim!

Jim M. wrote:

> I have a simple recipe for just this purpose at…
> 
> [Wolfmans Howlings](http://blog.wolfman.com/articles/2006/05/26/capistrano-local-deploy-recipe)
