Running a docker container in a serverless environment with private networking

Chintan Shah 0 Reputation points
2023-02-19T09:38:01.0766667+00:00

We are building an aspnet core web app. It has two main projects. One is for booting up the web APIs and another is for db migration. Db migration project is a console application. We want to run db migration first through something similar to AWS lambda, and on successful exit, We will run our web application through Azure App Service. Now, the challenge within azure is that Azure Functions are not truly serverless if you select Function Premium and all required features such as Linux environment with Private Link is only available in premium plans. Is there a truly serverless way of executing our console application?

This is the docker-compose I use to execute the same scenario in a VM. Works in a VM but wants to use Azure App Service.

services:
  app:
    image: ${IMAGE_NAME}
    container_name: app
    environment:
      RUNNING_ENVIRONMENT: Development
    depends_on:      
      migrator:
        condition: service_completed_successfully
      redis:
        condition: service_started
    ports:
      - 5001:80
    volumes:
      - ./appsettings.Production.json:/app/appsettings.Production.json

  migrator:
    image: ${MIGRATOR_IMAGE_NAME}      
    container_name: migrator
    environment:      
      RUNNING_ENVIRONMENT: Development    
    volumes:
      - ./appsettings.Production.json:/app/appsettings.Production.json

  redis:
    image: redis:latest
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,566 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
325 questions
{count} votes