skip to Main Content

I have this problem with app service.
I have an Azure Container Registry with 2 repositories. One contains the Docker image of an API, and the other contains the Docker image of the frontend.
I have also an App Service with a Basic plan. I would like to deploy both images to this App Service without using Slots (which would require a Plan upgrade that we do not want to do).

I’ve tried using Deployment Center, but I can only deploy one image at a time. I’ve also tried using a script in the pipeline on DevOps, with deployment after each build, but the last of the two projects to build overrides the other one on the App Service.

How can I solve this?
Thank you very much,
Francesco

2

Answers


  1. As long as I know + what docs says… the basic App Service Plan supports maximum of 3 instances. Which is fine.

    In this case you will need to use the "custom container" functionality, where you can also define multi-container deployment. See the links below:

    1. Quickstart – custom container
    2. Deployment of multi-container app

    Hopefully this will give you a headstart !

    [EDIT]

    with multi-container deployment you will also need to utilise the usage of Docker Compose configuration. Also keep in mind that the "multi-container" deployment functionality is still in Preview.

    Login or Signup to reply.
  2. App Service supports multi-containers with the use of a Compose file. Since you mentioned that you have an API and a frontend, I’m guessing both containers must be exposed over the Internet. This issue is because App Service only listens on port 80/443. To get around that, you need to add a 3rd container that will act as a reverse proxy and route the traffic to the front or API. You can use something like Nginx or YARP (.NET).

    If your API is not exposed to the Internet and is accessed by the code running in the frontend container, then there’s no need to use a reverse proxy. The frontend will be able to reach the API using the service name and port configured in the Compose file.

    Note that some Compose features are not supported. Read the doc.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search