# On Deploy Files/Folders Also Created On Separate DB Server

**URL:** <https://www.ruby-forum.com/t/on-deploy-files-folders-also-created-on-separate-db-server/106737>\
**Category:** Deployment\
**Created:** [June 13, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/on-deploy-files-folders-also-created-on-separate-db-server/106737 "2007-06-13T18:00:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnunemaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/919ad9/32.png) [@jnunemaker](https://www.ruby-forum.com/u/jnunemaker)\
**Post date:** [June 13, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/on-deploy-files-folders-also-created-on-separate-db-server/106737/1 "2007-06-13T18:00:38Z")

</div>

I have a web/app/svn server and a separate database server. Whenever I  
deploy my app, it treats the db server identical to the web/app  
server. By that, I mean it sets up the releases folder, etc. and  
deploys the entire app to the db server in addition to doing it on the  
web/app server.

I end up with /path/to/myapp/(current|releases|revisions.log|shared)  
on both the db server and the web/app server. Is there anyway to make  
capistrano only deploy code to the web/app server and only do database  
stuff on the database server?

I declared roles in my deploy.rb recipe like so:

role :web, domain  
role :app, domain  
role :db, “db.#{subdomain}”, :primary =\> true  
role :scm, “app.#{subdomain}”

I figured it would only execute the svn and code updates on the web  
and app servers (which are the same in my case).

---

<div class="post-metadata">

**Author:** ![jnunemaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/919ad9/32.png) [@jnunemaker](https://www.ruby-forum.com/u/jnunemaker)\
**Post date:** [June 13, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/on-deploy-files-folders-also-created-on-separate-db-server/106737/2 "2007-06-13T22:59:36Z")

</div>

> I declared roles in my deploy.rb recipe like so:
> 
> role :web, domain  
> role :app, domain  
> role :db, “db.#{subdomain}”, :primary =\> true  
> role :scm, “app.#{subdomain}”
> 
> I figured it would only execute the svn and code updates on the web  
> and app servers (which are the same in my case).

Add :no\_release =\> true …

role :db, “db.#{subdomain}”, :primary =\> true, :no\_release =\> true

---

<div class="post-metadata">

**Author:** ![jnunemaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/919ad9/32.png) [@jnunemaker](https://www.ruby-forum.com/u/jnunemaker)\
**Post date:** [June 14, 2007, 8:03am UTC](https://www.ruby-forum.com/t/on-deploy-files-folders-also-created-on-separate-db-server/106737/3 "2007-06-14T08:03:35Z")

</div>

Sweet. I’ll try that tomorrow.
