I'm using Cap v3 with a stage file for my "production" stage (I call it "public") that looks like this:
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.