App exec with env file

When calling `kamal app exec` for new non interactive containers, run
the command per role on each server and include the role config
including the environment.

Fixes: https://github.com/basecamp/kamal/issues/492
This commit is contained in:
Donal McBreen
2023-09-25 15:07:05 +01:00
parent 83a2d52ff4
commit 645f5ab72d
2 changed files with 7 additions and 3 deletions

View File

@@ -159,7 +159,7 @@ class CliAppTest < CliTestCase
test "exec" do
run_command("exec", "ruby -v").tap do |output|
assert_match "docker run --rm dhh/app:latest ruby -v", output
assert_match "docker run --rm --env-file .kamal/env/roles/app-web.env dhh/app:latest ruby -v", output
end
end