Search code examples
sqliteflaskappfog

How can I use sqlite in appfog?


I'm using flask on appfog.com to make a personal blog. Today I tried to use sqlite. I can run the application locally with sqlite but when I update the app to AppFog, it does not seem to work. I can't find how to use sqlite in AppFog's docs. Can anyone tell me?

Thanks...

Sorry for my poor english:-)


Solution

  • It's not recommended to use sqlite for your production apps on AppFog because the file storage is ephemeral. Every time you update your app the database will get blown away. You're better off creating and binding a postgres, mysql, or mongodb database service for your app. You can continue to use sqlite db locally but your production app will use the bound service.

    See the Bind Service section of: https://docs.appfog.com/languages/python/flask