Hosting SQLite DB on Azure Storage?

耗尽温柔 提交于 2019-12-14 03:48:56

问题


I need to host an SQLite database on Azure that will be shared among several web apps. My only options seem to be Azure Blob or File Storage (since they got rid of the "Azure Websites" that provided dedicated storage shared among web instances). However, there does not appear to be any way to map an Azure Storage share to a drive that the Web App will recognize, and thus no way to generate a path that SQLite can use. And obviously, SQLite can't use REST APIs to access the DB without tremendous hacking in the SQLite VFS.

So I'm wondering if anyone has successfully hosted an SQLite DB on Azure Storage such that it was accessible to a Web App?


回答1:


Azure Web Apps (formerly known as Web Sites) still exists, and still has durable, shared storage across your web app instances.

You cannot use a blob to hold SQLite, as it is not compatible with file I/O (it has a REST API for access). And you cannot simply attach an Azure File Storage volume (you can use one, via API, but cannot mount it to an Azure Web App instance).

Nothing's changed with Web Apps: just place your SQLite database in a directory underneath your app's root directory.



来源:https://stackoverflow.com/questions/43546946/hosting-sqlite-db-on-azure-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!