Closed skylar-anderson closed 2 months ago
:+1:
:+1:
To be specific, we have a script that needs to run after any restart, whether a new deploy or a manual restart, so hoping that this after_release
hook would run on any restart (or at least have that option).
:+1: Seems like this would be a good place for sending deployment notifications to New Relic (https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/deployment-notifications)
@tobalsgithub Could a possible workaround be making a deploy script and using that in the profile? That should be run everytime an instance restarts.
@Rich86man what is this "profile" you speak of? Something in the Dockerfile? Or...?
Sorry, Procfile
Ah, gotcha. Well...not totally sure. I think it depends on the order that things happen on your end.
Before I dive in, I should say you might want to disregard our specific use case. We're still on your V1 platform, and are actively working to move off of that, at which point this specific issue will be moot.
But, to give context, we have a script that we run that manually re-maps an internal TCP vhost to the new containers that come up during a release. Frank helped us create it a long while back, before you had official support for internal TCP vhosts. So, the script has to run AFTER the new containers are up and running. So, depending on when containers are marked as officially released, and old containers are dropped, the Procfile solution might work.
Again, I wouldn't design around our use case, as it was a workaround for lack of functionality that you guys now have.
Ahhh I see. To be clear, I don't work for Aptible, I just stumbled into this issue looking for an accurate, automated way to inform rollbar of a deploy. We're going to try the procfile solution until a
until an after realize hook is implemented.
Ah...gotcha...haha. Well, thanks for the suggestion. Definitely worth a shot.
@skylar-anderson Et al.: As an expansion to before_release, add the following hooks within your .aptible.yml to set up better automation around app lifecycle events on Aptible:
An
after_release
hook would help customers automate health checks after a successful deployment.