An Azure service that provides an event-driven serverless compute platform.
Hello @Radu Lung
You are not able to deploy the function with P0v3 under the "App Service" hosting option because this option treats your container as a generic web application, lacking the specific runtime integration and orchestration required for Azure Function Apps. The "Functions Premium" option (EP1) is purpose-built for containerized Function Apps.
Yes, there are ways to make this cheaper than EP1:
- Azure App Service (Web App for Containers) on a Dedicated Plan (e.g., P0v3, B1, S1): You can deploy your containerized Function App as a Web App for Containers on a dedicated App Service Plan (like your P0v3, or even cheaper Basic/Standard plans). This requires specific configuration:
* Correct Dockerfile: Your Docker image must include the Azure Functions runtime and expose the correct port (usually 80) for the Functions host. Use a base image like mcr.microsoft.com/azure-functions/node:4-node18-appservice (or equivalent for your language).
* Create an Azure App Service (Web App): Instead of a "Function App" resource, create an "App Service" resource.
* Configure Container Settings: Point it to your ACR image.
* Set Application Settings: Crucially, you must set application settings like FUNCTIONS_WORKER_RUNTIME (e.g., node), WEBSITES_ENABLE_APP_SERVICE_STORAGE to false, WEBSITES_PORT to 80, and AzureWebJobsStorage connection string.
This method allows you to use your P0v3 plan (or cheaper ones) but you pay for the plan's capacity whether functions are running or not, and it requires more manual configuration.
- Azure Container Apps or Azure Kubernetes Service (AKS): For more advanced scenarios, you can deploy your containerized Function App to Azure Container Apps or AKS. Azure Container Apps is a more managed serverless container platform that can scale to zero and can be cost-effective. AKS offers maximum control but has higher complexity and management overhead. Both require setting up KEDA for event-driven scaling of Function Apps.
If the Answer is helpful, please click Accept Answer and Up-Vote, so that it can help others in the community looking for help on similar topics.