Reputation: 97
I have a website deployed on Azure. I used PostgreSQL to create my database (with Sequelize as my ORM).
I know that Azure doesn't natively support PostgreSQL (I believe?) so I created a PostgreSQL database on a VM running on Ubuntu, while running on Azure.
However, I have to connect my website's server to the VM database, and I'm not quite sure how to do that, while also establishing the models I created in Sequelize.
Upvotes: 1
Views: 1414
Reputation: 8413
You need to forward a port (usually 5432) on that VM firewall.
Then you simply connect to that machine by specifying your VM public IP address, or URL.
It makes sense to have your website and this VM inside same Virtual Network for performance reasons. You can actually do that with Azure Apps (former Websites).
Upvotes: 2