Search code examples
sqliteazureghost-blogghost

Ghost blog using SQLite on Azure


How does ghost persists data if it is using SQLite? When hosted on Azure, and the virtual machine goes down, won't all the data in the SQLite database be lost?


Solution

  • Assuming that you're talking about Azure web apps, it works as follows: the web app content is stored on a fileserver. When the web app is activated, that fileserver drive is mounted as a share by the web worker server(s) that are handling requests to your website. Hence, the SQLite database will be persisted to disk, on that fileserver. If the web worker server goes down, the fileshare is unmounted, but all of the content is still contained there. When the web app is reactivated (i.e. by an incoming request) the fileshare will be remounted, with all of the same content.