capistrano
Remove the $deploy_to/repo directory
Capistrano 3 で secrets.yml をどう配置するか - Rails Tips - Ruby on Rails with OIAX
set :linked_files, %w{config/database.yml}
capistrano3のデプロイを把握する - Qiita タスク群。before/afterをどこにはさむかが分かる
capistrano-withrsyncを使ってVagrantで構築したVMにデプロイする | blog: takahiro okumura
だからbundle_flags --deploymentはダメですよ
You need to convert those to the Capistrano 3 on ... roles syntax to make them work.