post-deployment command?

We have deploy.release_command to run a command before a release is deployed.

Is there any way to run a command after a release is deployed? I know that the meaning of “after” is subtle, but I trust that you could pick something vaguely reasonable.

My specific use case is that my server spins up an ephemeral Tailscale node, and I want to update DNS. (Yes, Tailscale could do this, but they don’t now.)

I would also use this to post to a #ops Slack channel.

Thanks!

3 Likes

I’d also like to know if there’s an answer for this, other than creating a deploy script on my local computer

I could also use this. I would seem theres a point at which the deploy is marked as a success or failure, calling a script at this point would be super useful to update slack, register the deploy in error tracking, etc

Any word from fly.io on this?

I could use this as well! Trying to do this right now!

I could also use this. My use case is for deploying v2 of an app that requires making database schema updates. If I make the schema updates in release_command, then machines still running v1 of the app while the deployment is in progress are running against the wrong database schema. So, better would be for release_command to set a flag in the db that the machines still running v1 could read to know that they are now running an obsolete version, and for a post-deployment command to be able to clear that flag.