diff options
Diffstat (limited to 'config/deploy.rb')
| -rw-r--r-- | config/deploy.rb | 60 | 
1 files changed, 60 insertions, 0 deletions
| diff --git a/config/deploy.rb b/config/deploy.rb new file mode 100644 index 0000000..27168a9 --- /dev/null +++ b/config/deploy.rb | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | # config valid for current version and patch releases of Capistrano | ||
| 2 | lock "~> 3.19.2" | ||
| 3 | |||
| 4 | set :application, "pokeviewer" | ||
| 5 | set :repo_url, "/srv/git/pokeviewer" | ||
| 6 | |||
| 7 | # Default branch is :master | ||
| 8 | # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp | ||
| 9 | |||
| 10 | # Default deploy_to directory is /var/www/my_app_name | ||
| 11 | set :deploy_to, "/srv/www/pokeviewer" | ||
| 12 | |||
| 13 | # Default value for :format is :airbrussh. | ||
| 14 | # set :format, :airbrussh | ||
| 15 | |||
| 16 | # You can configure the Airbrussh format using :format_options. | ||
| 17 | # These are the defaults. | ||
| 18 | # set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto | ||
| 19 | |||
| 20 | # Default value for :pty is false | ||
| 21 | # set :pty, true | ||
| 22 | |||
| 23 | # Default value for :linked_files is [] | ||
| 24 | append :linked_files, 'config/master.key', 'config/credentials/production.key' | ||
| 25 | |||
| 26 | # Default value for linked_dirs is [] | ||
| 27 | append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets" #, "public/system", "vendor", "storage" | ||
| 28 | |||
| 29 | # Default value for default_env is {} | ||
| 30 | # set :default_env, { path: "/opt/ruby/bin:$PATH" } | ||
| 31 | set :default_env, { 'RAILS_RELATIVE_URL_ROOT' => '/poke3' } | ||
| 32 | |||
| 33 | # Default value for local_user is ENV['USER'] | ||
| 34 | # set :local_user, -> { `git config user.name`.chomp } | ||
| 35 | |||
| 36 | # Default value for keep_releases is 5 | ||
| 37 | # set :keep_releases, 5 | ||
| 38 | |||
| 39 | # Uncomment the following to require manually verifying the host key before first deploy. | ||
| 40 | # set :ssh_options, verify_host_key: :secure | ||
| 41 | |||
| 42 | # rvm | ||
| 43 | set :rvm_type, :system | ||
| 44 | set :rvm_custom_path, '/usr/local/rvm' | ||
| 45 | |||
| 46 | # rails | ||
| 47 | set :rails_env, 'production' | ||
| 48 | set :conditionally_migrate, true | ||
| 49 | set :migration_role, :app | ||
| 50 | set :assets_roles, [:app] | ||
| 51 | |||
| 52 | namespace :deploy do | ||
| 53 | after :updated, :compile do | ||
| 54 | on primary(:app) do | ||
| 55 | within release_path do | ||
| 56 | rake "compile" | ||
| 57 | end | ||
| 58 | end | ||
| 59 | end | ||
| 60 | end | ||
