Kamal 2 can deploy multiple apps on a single server so it’s easy to lose track of what’s deployed. This alias will fix it.
To see all running apps on a server we need to query Kamal Proxy:
$ ssh [USER]@[SERVER]
$ docker exec kamal-proxy kamal-proxy list
Service Host Target State TLS
dealership dealearship.com cde2433e86d6:80 running yes
dealership-api api.dealearship.com 82361b53174f:80 running yes
...
But even better, we can create an alias inside config/deploy.yml
:
# config/deploy.yml
...
aliases:
apps: server exec docker exec kamal-proxy kamal-proxy list
Now running kamal apps
gives us a nice rundown of what’s running which is pretty sweet.
Check out my book
Learn how to use Kamal to deploy your web applications with Kamal Handbook. Visualize Kamal's concepts, understand Kamal's configuration, and deploy practical life examples.