capistrano: enable conditional migrations.

This commit is contained in:
evazion
2019-08-07 22:11:07 -05:00
parent 9996dd40bb
commit 223e5f1e81
2 changed files with 11 additions and 5 deletions

View File

@@ -4,5 +4,11 @@ set :application, "danbooru"
set :repo_url, "git://github.com/r888888888/danbooru.git"
set :deploy_to, "/var/www/danbooru2"
set :rbenv_ruby, "2.5.1"
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle')
append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "vendor/bundle"
set :branch, ENV.fetch("branch", "master")
# skip migrations if files in db/migrate weren't modified
set :conditionally_migrate, true
# run migrations on the primary app server
set :migration_role, :app

View File

@@ -1,11 +1,11 @@
set :user, "danbooru"
set :rails_env, "production"
server "kagamihara", :roles => %w(web app db), :primary => true
set :rbenv_path, "/home/danbooru/.rbenv"
append :linked_files, ".env.production"
server "kagamihara", :roles => %w(web app), :primary => true
server "shima", :roles => %w(web app)
server "saitou", :roles => %w(web app)
server "oogaki", :roles => %w(worker)
set :linked_files, fetch(:linked_files, []).push(".env.production")
set :rbenv_path, "/home/danbooru/.rbenv"
after "deploy:finished", "newrelic:notice_deployment"