Module: Mimas::Server::Console

Included in:
Mimas::Server
Defined in:
lib/mimas/server/console.rb

Instance Method Summary collapse

Instance Method Details

#start_console(site) ⇒ Object



4
5
6
7
8
9
# File 'lib/mimas/server/console.rb', line 4

def start_console(site)
  console_command = site.console
  exec_command = "cd #{current_path(site)} && /usr/bin/env bash -lc 'set -a; source #{site_root(site).join(".env")}; source #{site_root(site).join("mimas", "mimas.env")}; rv run #{console_command}'; set +a;"

  interactive_ssh(host, user: user, command: exec_command)
end