I have created an Azure Function with the following Docker Image:
FROM mcr.microsoft.com/azure-functions/python:4-python3.11
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true
COPY requirements.txt /
RUN pip install -r /requirements.txt
COPY . /home/site/wwwroot
My Container Logs show the following:
2024-09-06T10:13:33.629Z INFO - Container dev-confluence-connector_1_d2f0bfc7_msiProxy for site dev-confluence-connector initialized successfully and is ready to serve requests. 2024-09-06T10:13:33.629Z INFO - Initiating warmup request to container dev-confluence-connector_1_d2f0bfc7 for site dev-confluence-connector 2024-09-06T10:13:42.225Z INFO - Container dev-confluence-connector_1_d2f0bfc7 for site dev-confluence-connector initialized successfully and is ready to serve requests.
But my Function is not listed:
In the "App Files" Tab, I can see that all my files are correctly added.
This is my file structure:
├── Dockerfile
├── Makefile
├── README.md
├── confluence_synchronisation (here are my python scripts)
├── function_app.py
├── host.json
├── poetry.lock
├── pyproject.toml
├── requirements.txt
host.json:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
},
"functionTimeout": "23:00:00"
}
Environment Variables in Azure Portal:
[
{
"name": "AzureWebJobsDashboard",
"value": "DefaultEndpointsProtocol=https;AccountName=devstgconfluenceconn;AccountKey=****==;EndpointSuffix=core.windows.net",
"slotSetting": false
},
{
"name": "AzureWebJobsStorage",
"value": "DefaultEndpointsProtocol=https;AccountName=devstgconfluenceconn;AccountKey=****==;EndpointSuffix=core.windows.net",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_PASSWORD",
"value": "******",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"value": "https://******.azurecr.io",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_USERNAME",
"value": "***",
"slotSetting": false
},
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~4",
"slotSetting": false
},
{
"name": "WEBSITE_RUN_FROM_PACKAGE",
"value": "1",
"slotSetting": false
},
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"value": "false",
"slotSetting": false
}
]