Cap v3 correct way to skip deploy to db server?

20 views
Skip to first unread message

Roy Miller

unread,
Aug 6, 2014, 11:00:32 AM8/6/14
to capis...@googlegroups.com
I'm using Cap v3 with a stage file for my "production" stage (I call it "public") that looks like this:

```ruby
set :stage, :public
set :rails_env, 'production'
set :user, 'deploy'
set :default_initial_user_on_target, 'ubuntu'
set :ssh_options, { forward_agent: true }
server '[app server dns]', user: 'deploy', roles: %w{web app}, primary: true, keys: ['path/to/key']
server '[db server dns]', user: 'deploy', roles: %w{db}, primary: true, no_release: true, keys: ['path/to/key']

```

Research suggested that `primary: true` and `no_release: true` would skip the app deploy on the db server, but still run migrations to get the database right. Seems pretty simple, but the deploy seems to be trying to deploy to the db server anyway.

Am I doing this wrong?
Reply all
Reply to author
Forward
0 new messages