Redeploy Yesod app with Keter without recreating database

I am writing my first app with Yesod, and I've got it to a state where it works, but I want to keep adding little things to it. So far, every time I redeploy with keter by swapping in the new package, the database gets recreated for that app. How can I redeploy without that effect? I am not very familiar with postgres, so a workaround would be great as well.

Edit: I also scaffolded it with SQLite, if that makes a difference. I have been looking all over and still can't figure this out.

Answers


In contrast to what the accepted answer says, you can actually do this. In the sqlite.yml configuration, you just set the path to a place that it has access to.

My current setup is, I've made a folder at /opt/keter/database and then my config for production is,

Production:
  database: /opt/keter/database/HsCMS_production.sqlite3
  poolsize: 100
  <<: *defaults

which will keep the database persistent across deployments. You should be aware of when you alter the database though, it still needs to do migrations.


The answer that I figured out eventually was that I couldn't make it keep the data if it was scaffolded with Sq-lite.


Need Your Help

Telerik Reporting - can't export in Chrome when using SqlDataSource

google-chrome telerik telerik-reporting export-to-pdf

EDIT 2: Using fiddler I was able to find out that I'm getting a 504 error, but it makes no sense to me how that could possibly be happening.