1 min read

Locking an environment in Shipyrd for your Kamal deployments

Kamal has it's own lock file that it drops on your server for each destination that you're deploying to. But really when there's more than one of you deploying, the lock starts as you prep for a deploy to go out. You usually let your team know that you're about to deploy to production via Slack or with the merge of a PR, a heads up so that you don't step on each other's toes or essentially deploy over one another.

While the deploy lock file that Kamal uses is essential, I wanted to provide a simple way to indicate that you're about to deploy to an environment.

With the new lock/unlock feature in place you can easily see if someone is busy with an environment and go grab a delicious sandwich. This also has the added benefit of not attempting to deploy and getting a "Deploy lock already in place!" error. With Kamal 2, the deploy lock file check was moved to after post-build which means your container has to be built first before you even see the "Deploy lock already in place!" error.

Added bonus: you can connect Slack to your Shipyrd account to ping Slack when an environment is locked/unlocked as well as when a deploy completes.