0

I containerized my .NET Core REST API app with Docker, ran it locally and everything worked fine. However, now that I deployed my container to Azure (using Container Instance), my API endpoints are not responding anymore. All of my endpoints query from my SQL Server database which I think could be the problem since my server name is my home IP config.

I am at lost as to what to do to try to make my SQL Server work with my deployed app.

Do I create a SQL Server on Azure, then connect my local SQL Server to Azure, then configure my app to that hosted SQL Server instead? Or is there another way?

Thanks in advance.

diagoot
  • 39
  • 1
  • 7
  • Have you tried intranet port mapping or intranet penetration to provide sql service?If funds allow,you'd better migrate your local sql to Azure sql. Azure is the only cloud with evergreen SQL that automatically applies the latest updates and patches so that your databases are always up to date—eliminating end-of-support hassle. Even complex tasks like performance tuning, high availability, disaster recovery, and backups are automated, freeing you to focus on applications. – Joseph Xu Sep 02 '20 at 01:41
  • "All of my endpoints query from my SQL Server database which I think could be the problem" -what? What about instead of THINKING you apply proper baseline programming: Add exception handling and tracing. Use Azure Application Insights. Then you do not have to think but can look at the exception and error logs. – TomTom Sep 04 '20 at 09:55

1 Answers1

0

As far as I know, you can use following options:

  1. You can connect your on-premises computers and networks to a virtual network using Azure VNet.

  2. Migrate your on-premises SQL Server to Azure SQL Database according to this doc.

Joseph Xu
  • 5,607
  • 2
  • 5
  • 15