Django website with sqlite db deployment on heroku

有些话、适合烂在心里 提交于 2021-02-02 03:46:50

问题


I have been reading at many places that Heroku doesn't support sqlite database. Is there no option to use sqlite? Is there any kind of wrapper or plug-in to be used with sqlite so that it can be deployed in Heroku? Can anyone share resources or guides to do the same end to end?


回答1:


No, there is no way to do this. An sqlite database is a file on disk, but the filesystem on Heroku is ephemeral and not shared between dynos, so the db would be lost every time you deploy.

But there is no reason to try. Django already abstracts away all the differences between databases for regular usage. Heroku supports a number of Postgres plans for different use cases, including a free hobby tier.



来源:https://stackoverflow.com/questions/51148569/django-website-with-sqlite-db-deployment-on-heroku

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