HomeJ
HomeJ

Reputation: 43

Is it possible to run Azure Logic Apps On Premise

Recent announcements for Azure logic apps says

"With this release you can now run Logic Apps wherever you run Azure Functions – containerized in Docker or Kubernetes environments such as AKS (Azure Kubernetes Service) or App Service for a managed PaaS experience"

Can it be hosted in docker ? I don't see any articles related to that .

Upvotes: 3

Views: 5440

Answers (2)

Chris Langston
Chris Langston

Reputation: 251

The links referenced above no longer provide information about how to do the Docker support.

Piecing the replies above together I ended up doing the following:

  1. In my Logic App project in VSCode, add a DockerFile to the root of the project
  2. Paste in the docker instructions as @juunas referenced:

FROM mcr.microsoft.com/azure-functions/dotnet:3.0.14492-appservice

ENV AzureWebJobsStorage={FILL-IN-YOUR-STORAGE-ACCOUNT-CONNECTION-STRING}
ENV AZURE_FUNCTIONS_ENVIRONMENT Development
ENV AzureWebJobsScriptRoot=/home/site/wwwroot
ENV AzureFunctionsJobHost__Logging__Console__IsEnabled=true
ENV FUNCTIONS_V2_COMPATIBILITY_MODE=true

COPY ./bin/release/netcoreapp3.1/publish/ /home/site/wwwroot

  1. Run the following commands from a command prompt

dotnet build -c release
dotnet publish -c release

  1. Build the docker image

docker build --tag local/workflowcontainer .

  1. Run your container

docker run -e WEBSITE_HOSTNAME=localhost -p 8080:80 local/workflowcontainer

I gathered the information above from the following website:

https://microsoft.github.io/AzureTipsAndTricks/blog/tip311.html

Upvotes: 3

juunas
juunas

Reputation: 58853

Yes, the documentation shows how you can package the app into a Docker container: https://learn.microsoft.com/en-us/azure/logic-apps/create-stateful-stateless-workflows-visual-studio-code#deploy-to-docker-container.

From the docs:

dotnet build -c release

dotnet publish -c release

docker build --tag local/workflowcontainer .

The example uses a dockerfile like this:

FROM mcr.microsoft.com/azure-functions/dotnet:3.0.14492-appservice

ENV AzureWebJobsStorage <storage-account-connection-string>
ENV AZURE_FUNCTIONS_ENVIRONMENT Development
ENV AzureWebJobsScriptRoot=/home/site/wwwroot
ENV AzureFunctionsJobHost__Logging__Console__IsEnabled=true
ENV FUNCTIONS_V2_COMPATIBILITY_MODE=true

COPY ./bin/Release/netcoreapp3.1/publish/ /home/site/wwwroot

The container is then run with:

docker run -e WEBSITE_HOSTNAME=localhost -p 8080:80 local/workflowcontainer

Upvotes: 4

Related Questions