skip to Main Content

I am new to the concept of deployment of apps as app service in Azure using Docker.

I have a R Shiny application that I have deployed in Azure as an app service using Docker.
Here are few details for reference:

  1. Azure Resource Group – Test_RG
  2. Azure Container Registry – Test_CR
  3. Azure App service name – Test_app

In the R shiny script, I have provided the below details for the application port

### Specify application port ### options(shiny.host = "0.0.0.0") options(shiny.port = 8080)

Now this application deployment is successful and I can access the app service through my browser.

Issue arises when I am trying to deploy another R shiny application in the same Azure Resource Group (Test_RG) and same Azure Container Registry (Test_CR).

In the second R shiny script, I have mentioned another application port to avoid conflict

### Specify application port ### options(shiny.host = "0.0.0.0") options(shiny.port = 8000)

In terms of deployment in Azure, I don’t get any issues but when I am trying to access the app service, nothing is coming up.

Can someone help to figure out what exactly is the issue or if I am doing anything incorrectly ?
My understanding is that I can deploy multiple app services in a single Container Registry but with different ports to avoid conflict ?

Any help would be appreciated !

2

Answers


  1. I believe that Azure expects port 80. Try this as the final lines in the Dockerfile.

    # launch app
    EXPOSE 80
    CMD ["R", "-e", "shiny::runApp('/home/code', host = '0.0.0.0', port = 80)"]
    
    Login or Signup to reply.
  2. Basically, in your first application you have mentioned that port number as 8080 but here in app service there will be default port 80 and it will run in 80 as the same in the application.

    • Whereas coming to second application here you configured the port number in application but not in app service one way you can configure while creating app service.

    enter image description here

    Another way: After deployment.

    • Here, you need to configure the port number in app service<deployment center<main<port here you can change the port to 8000.

    enter image description here

    After changing the port number, you can be able to access the application if your first application works successfully.

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