diff --git a/config/deploy.rb b/config/deploy.rb index 3d68dfe..54323d2 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,7 +1,7 @@ set :application, 'dmptool' set :repo_url, 'https://github.com/CDLUC3/roadmap.git' -set :user, 'dmp' +#set :user, 'dmp' # Default branch is :master # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp @@ -24,10 +24,10 @@ # set :pty, true # Default value for :linked_files is [] -append :linked_files, 'config/database.yml', 'config/secrets.yml'#, 'ldap.yml' +append :linked_files, 'config/database.yml', 'config/secrets.yml' # Default value for linked_dirs is [] -append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system', 'uploads' +append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system' # Default value for default_env is {} set :default_env, { path: "/dmp/local/bin:$PATH" } @@ -35,18 +35,11 @@ # Default value for keep_releases is 5 # set :keep_releases, 5 -#set :deploy_via, :remote_cache -#set :copy_exclude, ['.git'] -#set :ssh_options, { :forward_agent => true } -#set :use_sudo, false - namespace :deploy do - after :restart, :clear_cache do within release_path do execute :rake, 'cache:clear' end end - after :deploy, :cleanup end \ No newline at end of file diff --git a/config/deploy/development.rb b/config/deploy/development.rb index 7406b30..9195edd 100644 --- a/config/deploy/development.rb +++ b/config/deploy/development.rb @@ -18,8 +18,6 @@ role :web, %w{uc3-roadmap-dev.cdlib.org} role :db, %w{uc3-roadmap-dev.cdlib.org} - - # Configuration # ============= # You can set any configuration variable like in config/deploy.rb @@ -28,7 +26,15 @@ # http://capistranorb.com/documentation/getting-started/configuration/ # Feel free to add new variables to customise your setup. +set :sudo, true +on 'uc3-roadmap-dev.cdlib.org' do + #execute :sudo, 'su - dmp' + + as(user: 'dmp', group: 'dmp') do + :deploy + end +end # Custom SSH Options # ================== @@ -55,4 +61,4 @@ # forward_agent: false, # auth_methods: %w(publickey password) # # password: 'please use keys' -# } +# } \ No newline at end of file