Class: Avm::EacRailsBase0::Deploy

Inherits:
Avm::EacWebappBase0::Deploy
  • Object
show all
Defined in:
lib/avm/eac_rails_base0/deploy.rb

Instance Method Summary collapse

Instance Method Details

#assert_databaseObject



17
18
19
20
# File 'lib/avm/eac_rails_base0/deploy.rb', line 17

def assert_database
  infom 'Asserting database...'
  instance.rake('db:create').system!
end

#bundle_installObject



22
23
24
25
# File 'lib/avm/eac_rails_base0/deploy.rb', line 22

def bundle_install
  infom 'Running "bundle install"...'
  instance.bundle('install').system!
end

#compile_assetsObject



27
28
29
30
# File 'lib/avm/eac_rails_base0/deploy.rb', line 27

def compile_assets
  infom 'Compiling assets...'
  instance.rake('assets:clean', 'assets:precompile').system!
end

#database_migrateObject



32
33
34
35
# File 'lib/avm/eac_rails_base0/deploy.rb', line 32

def database_migrate
  infom 'Running database migrations...'
  instance.rake('db:migrate').system!
end

#restart_tasks_schedulerObject



37
38
39
40
# File 'lib/avm/eac_rails_base0/deploy.rb', line 37

def restart_tasks_scheduler
  infom 'Restarting Tasks Scheduler\'s daemon...'
  instance.bundle('exec', 'tasks_scheduler', 'restart').system!
end

#touch_restart_fileObject



42
43
44
45
46
47
48
# File 'lib/avm/eac_rails_base0/deploy.rb', line 42

def touch_restart_file
  infom 'Touching restart file...'
  instance.host_env.command(
    'touch', ::File.join(instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH),
                         'tmp', 'restart.txt')
  ).system!
end