Allow running detached app commands
this is useful for long running rake tasks or scripts that can be run without having to keep open connection to the server. Example: ``` kamal app exec 'bin/rails db:backfill_task' --detach ```
This commit is contained in:
@@ -7,9 +7,10 @@ module Kamal::Commands::App::Execution
|
||||
*command
|
||||
end
|
||||
|
||||
def execute_in_new_container(*command, interactive: false, env:)
|
||||
def execute_in_new_container(*command, interactive: false, detach: false, env:)
|
||||
docker :run,
|
||||
("-it" if interactive),
|
||||
("--detach" if detach),
|
||||
"--rm",
|
||||
"--network", "kamal",
|
||||
*role&.env_args(host),
|
||||
|
||||
Reference in New Issue
Block a user