CompositionalIT / farmer

Repeatable Azure deployments with ARM templates - made easy!
https://compositionalit.github.io/farmer
MIT License
523 stars 157 forks source link

Dedicated support for Startup Command. #1000

Closed isaacabraham closed 1 year ago

isaacabraham commented 1 year ago

This PR closes #999

The changes in this PR are as follows:

I have read the contributing guidelines and have completed the following:

If I haven't completed any of the tasks above, I include the reasons why here:

Below is a minimal example configuration that includes the new features, which can be used to deploy to Azure:

webApp {
    startup_command "foo.exe"
}

I'll test it end-to-end shortly. I'm sure I've done Linux deployments in the past so I'm surprised I can't find a clear way of doing this - @ninjarobot do you know any way to already do this in Farmer?

isaacabraham commented 1 year ago

Yes, similar to that. The WebApp builder already lets you supply a Docker container and Azure Container registry path, plus the startup command for docker - what I think wasn't available previously was the ability to set the startup command if you just uploaded your app using Zip Deploy (HTTP upload) - in that case, App Service creates a docker container for you with your app, but doesn't know what to use for the startup command so it just sits there doing nothing.

isaacabraham commented 1 year ago

@ninjarobot Ok I've remembered how you do it on Linux Web Apps again. If you supply a web.config file that contains the startup path, the app service uses that to do it. So this PR isn't really necessary.

ninjarobot commented 1 year ago

@isaacabraham do you still want to merge this?

ninjarobot commented 1 year ago

@isaacabraham I'm not sure whether you want to include this or not since you figured out another way. Do you want to merge this feature?

isaacabraham commented 1 year ago

I don't think it's really needed any more although it doesn't hurt to merge in.