在Heroku Cedar堆栈上使用Sqlite3 [英] Using Sqlite3 on Heroku Cedar stack

查看:119
本文介绍了在Heroku Cedar堆栈上使用Sqlite3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以在Heroku上使用Django的Sqlite3?

解决方案

雪松堆栈的文件系统是 not 只读。



但是,您仍然不能在其上存储任何数据,因为文件系统是短暂的



任何时候你的应用程序重新启动时,你写入应用程序文件系统的东西都会永远消失。



任何时候添加一个dyno,两个各自的dynos都有自己的短暂系统;任何一个dyno存储到临时文件系统的数据都不可用于其他dyno或以后可能添加的任何其他dynos。



Sqlite3将数据写入本地文件系统。您不能在Heroku中使用Sqlite3。



Heroku提供Heroku管理的默认PostgreSQL安装。您可以使用任何第三方管理的云数据库系统,例如Amazon RDS或Xeround的MySQL,MongoHQ或MongoLab的MongoDB,或Cloudant的CouchDB - 所有这些都可以作为Heroku插件使用。


Is there a way to use Sqlite3 with Django on Heroku?

解决方案

The cedar stack's filesystem is not readonly.

However, you still mustn't store any data on it because the filesystem is ephemeral.

Any time your application restarts, whatever you had written to your application's filesystem disappears forever.

Any time you add a dyno, the two dynos each have their own ephemeral system; any data stored by one dyno to its ephemeral filesystem is not available to the other dyno or to any additional dynos you may add later.

Sqlite3 writes data to the local filesystem. You cannot use Sqlite3 with Heroku.

Heroku provides a default PostgreSQL installation, which Heroku manages. You can use that.

You can also use any third-party-managed cloud database system, such as Amazon RDS' or Xeround's MySQL, MongoHQ's or MongoLab's MongoDB, or Cloudant's CouchDB - all of which are available as Heroku addons.

这篇关于在Heroku Cedar堆栈上使用Sqlite3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆