[deploy] config
This commit is contained in:
16
config/config.rb
Normal file
16
config/config.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
set :config_role, :app
|
||||
set :config_path, -> { release_path }
|
||||
set :config_type, 'json'
|
||||
|
||||
|
||||
namespace :config do
|
||||
task :setup do
|
||||
config_role = fetch(:config_role)
|
||||
config_path = fetch(:config_path)
|
||||
config_type = fetch(:config_type)
|
||||
on roles(config_role) do |server|
|
||||
# stage = fetch(:stage)
|
||||
execute "cd #{config_path} && cp config.#{server.hostname}.#{config_type} config.#{config_type}"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user