2

I am wondering if anyone knows the best way to create an Azure app service using my own mongodb image (has predefined data). I have created a web app using this image, but I am now trying to figure out how to open the required ports to access it using mongodb wire protocol. I don't want to use the CosmosDB as I already have predefined data and config setup in the image that I need.

Any help would be greatly appreciated Regards, Mitchell

Mitchell Day
  • 196
  • 2
  • 14
  • Does this answer your question? [Docker never runs on Azure - Waiting for response to warmup request for container](https://stackoverflow.com/questions/58723980/docker-never-runs-on-azure-waiting-for-response-to-warmup-request-for-containe) – CSharpRocks Mar 16 '22 at 00:05
  • Not quite. It still doesnt allow me to access the app service using a mongodb://:27017 url. I think there is two issues. 1 the app service doesnt allow mongodb wire protocol externally, and two the port config. This isnt the end of the world as I want another app service to access this app service via that protocol, so hopefully a private network and using internal IP address might solve the issue – Mitchell Day Mar 16 '22 at 01:20
  • Hi @MitchellDay - sorry to ask nearly a year later! Did you ever solve this? I'm using docker compose in Azure App Service to try and spin up a Mongo container - like you accessible via an API image within its own network - yet the docker container for Mongo doesn't seem to start up. Did you also use compose and if so would it be possible to share your config? I realise I can't access the DB externally but that's ok, I can live with that. Thanks in advance. – PoorbandTony Feb 17 '23 at 08:27
  • Hey, I gave up on that and used my own VM to host my own docker environment. Quickly researching, it seems there might be a way to do it. You can access through TCP using a custom VNET. Some links below on some others doing it using a azure storage volume, and some info on TCP ingress into containers. Which Mongodb:// protocol uses. https://learn.microsoft.com/en-us/azure/container-apps/ingress?tabs=bash https://learn.microsoft.com/en-us/answers/questions/645802/mongodb-installation-as-azure-container-instance-w Sorry I can't be any more help – Mitchell Day Feb 19 '23 at 21:32

1 Answers1

0

I'm afraid that it won't work. App Service can only expose HTTP protocol. You can not expose any other protocol.

Maybe Azure Container Instances work for you?

burna
  • 2,932
  • 18
  • 27