basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
10.51k stars 398 forks source link

`kamal app exec` disregard the `--destination` option #856

Closed leonvogt closed 3 months ago

leonvogt commented 3 months ago

Seems to me, that the -d / --destination option won't work with the kamal app exec command.

Scenario: I have a stage destination with the same containers on a different server. I wanna connect to a specific container with the following command:

# Connects to the default server
kamal app exec -i --reuse bash -d [CONTAINER_NAME] -r web

# Connects to the default server too
kamal app --destination stage exec -i --reuse bash -d [CONTAINER_NAME] -r web
kamal app -d stage exec -i --reuse bash -d [CONTAINER_NAME] -r web
kamal app exec -d stage -i --reuse bash -d [CONTAINER_NAME] -r web
leonvogt commented 3 months ago

My mistake, everything works fine!
Instead of

kamal app --destination stage exec -i --reuse bash -d [CONTAINER_NAME] -r web

I should have used

kamal app exec -i --reuse bash -d [CONTAINER_NAME]-stage -r web