Post Deployment Script in Azure Web App for Containers
Is it possible to run a post-deploy script inside a container in Azure Web App for Containers(not the "regular" Web App with Kudu).
I have an ARM template that creates some resources, including a Web App for Containers where I use a Dockerhub image. I want to run a post-deployment script inside the container(a database migration script if that matters("bundle exec rake db:migrate" specifically)).
I can put the command into the Startup File in the Container Settings in the Azure Portal. That runs the command successfully, but it doesn't start up the container normally. So, I have to remove the Startup File migration command after it completes and then restart the Web App for it to start up normally. This is not optimal, neither is running the migration command on every startup/restart and then starting up the webserver.
This type of post-deploy script option is available in Heroku's template deployments, using the scripts object and the postdeploy key in it. See https://devcenter.heroku.com/articles/app-json-schema#scripts.
Does such a post-deploy script option exist for Azure Web App for Containers?
If not, is there a simpler/better way to run the migrate command than what I'm currently doing?
Again, if this is not possible, can this be added? I believe something of this nature exists for the regular Web App, but I can't find any documentation for post-deployment scripts for Azure Web App for Containers.