Giter VIP home page Giter VIP logo

Comments (2)

nuochen avatar nuochen commented on September 27, 2024

I am also encountering the same issue. The dockerfile image I am using is: microsoft/azure-functions-python3.6:v2.0.11961-alpha

from azure-functions-docker-python-sample.

tjhgit avatar tjhgit commented on September 27, 2024

I made it work.
You first need to update the host.json to:

{
"version": "2.0",
"healthMonitor": {
"enabled": true,
"healthCheckInterval": "00:00:10",
"healthCheckWindow": "00:02:00",
"healthCheckThreshold": 6,
"counterThreshold": 0.80
},
"functionTimeout": "00:05:00",
"logging": {
"fileLoggingMode": "debugOnly"
},
"extensions": {
"http": {
"routePrefix": "api",
"maxConcurrentRequests": 5,
"maxOutstandingRequests": 30
},
"queues": {
"visibilityTimeout": "00:00:10"
},
"eventHubs": {
"batchCheckpointFrequency": 1,
"eventProcessorOptions": {
"maxBatchSize": 1000,
"prefetchCount": 1000
}
}
},
"swagger": {
"enabled": true
}
}

This is my Dockerfile:

FROM microsoft/azure-functions-python3.6:2.0.12121

ENV host:logger:consoleLoggingMode=always

COPY . /home/site/wwwroot

RUN cd /home/site/wwwroot && pip install -r requirements.txt

The I issued docker build and pushed the image to an azure registry.

Then using the portal add a Function App of type Linux Preview Docker (the az commands did not work for me however the deployment via portal). For the container image choose the one previously pushed.

Finally issue these 2 commands that configure parameters of the app:

storageConnectionString=$(az storage account show-connection-string --resource-group XXXX --name YYYYYY --query connectionString --output tsv)

az functionapp config appsettings set --name ZZZZZZ --resource-group XXXXX --settings AzureWebJobsDashboard=$storageConnectionString AzureWebJobsStorage=$storageConnectionString

from azure-functions-docker-python-sample.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.