Search code examples
azuredeploymentsuave

Can't publish a dummy F# Suave app as an Azure WebApp. What am I doing wrong?


The project was generated through Ionide and Visual Studio Code. I'm deploying to an Azure WebApp through GitHub.

The GitHub repository is: https://github.com/laygr/suave-dummy

The activity log says:

Command: build.cmd

The system cannot find the path specified.

The system cannot find the path specified.

D:\Program Files (x86)\SiteExtensions\Kudu\59.51109.2534\bin\Scripts\starter.cmd build.cmd

It is as simple as a Suave app gets. I hope that this can help others.

Edit

After restarting fresh again (new repo, new web app, new day, new hopes), azure showed a different error which allowed me to figure out the rest. I'll leave the repo so that anyone can see how to deploy the simplest Suave app as an Azure Web App through GitHub


Solution

  • So, after an improvement on the error shown by Azure, I could figure out how to deploy the app. I had to:

    • remove .exe from the .gitignore generated by Ionide for Visual Studio Code.
    • create .deployment
    • create web.config
    • modify the build.cmd (I copied it from somewhere else)
    • modify the build.fsx to perform the correct build
    • modify the startup file (suave-dummy.fs) to use the correct port

    Feel free to check the repo to see what I mean in code. Relevant files:

    • .gitignore
    • .deployment
    • suave-dummy\WebHost\web.config
    • build.cmd
    • build.fsx
    • suave-dummy\suave-dummy.fs

    phew!