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