Skip to content

Use sqlite database in production#224

Merged
meshy merged 1 commit intomainfrom
switch-to-in-memory-database
Jul 15, 2023
Merged

Use sqlite database in production#224
meshy merged 1 commit intomainfrom
switch-to-in-memory-database

Conversation

@meshy
Copy link
Copy Markdown
Contributor

@meshy meshy commented Jul 14, 2023

Before now, we've been using a postgres database to store the data in production. It's not worth the maintenance cost.

This changes the start-up script we use in production to create and populate an SQLite file before we start the server process.

We probably don't need to take the step of removing the sqlite file, but I'm not sure if it might already exist from previous builds in prod.

@meshy meshy changed the title Use in-memory database in production Use sqlite database in production Jul 15, 2023
Before now, we've been using a postgres database to store the data in
production. It's not worth the maintenance cost.

This changes the start-up script we use in production to create and
populate an SQLite file before we start the server process.

We probably don't need to take the step of removing the sqlite file, but
I'm not sure if it might already exist from previous builds in prod.
@meshy meshy force-pushed the switch-to-in-memory-database branch from 230e4d9 to 68bee52 Compare July 15, 2023 00:03
Copy link
Copy Markdown
Contributor

@ghickman ghickman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to drop psycopg2 from the requirements too? or are we keeping that for local dev?

I'll be nice to stop the need for a seperate db service in production!

@meshy
Copy link
Copy Markdown
Contributor Author

meshy commented Jul 15, 2023

That's probably a good idea, but I'm going to leave that for another PR.
It probably makes sense to remove the migrations too 🤔

@meshy meshy merged commit 7a22e5c into main Jul 15, 2023
@meshy meshy deleted the switch-to-in-memory-database branch July 15, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants