This pull request introduces significant changes to the database backup and persistence strategy by integrating Litestream for SQLite databases. Additionally, it updates related configurations and documentation to reflect these changes.
Database Backup and Persistence:
ARCHITECTURE.md: Added a detailed section on database backup and persistence using Litestream, including a flowchart, operational mechanism, limitations, differences in development environment, deployment settings, and troubleshooting tips.
Dockerfile: Updated to install Litestream, SQLite, and related tools. Modified database paths and added steps to handle database migration and backup. [1][2]
compose.yaml: Updated volume and environment configurations to reflect the new database path.
litestream.yml.template: Added configuration for Litestream to replicate the database to Google Cloud Storage.
run.sh: Added a script to handle database restoration from Cloud Storage, ensure compatibility with Prisma, and start the application with Litestream replication.
Documentation:
README.md: Added a link to the architecture overview document for more detailed information on the new database backup and persistence strategy.
close #37
Summary
This pull request introduces significant changes to the database backup and persistence strategy by integrating Litestream for SQLite databases. Additionally, it updates related configurations and documentation to reflect these changes.
Database Backup and Persistence:
ARCHITECTURE.md
: Added a detailed section on database backup and persistence using Litestream, including a flowchart, operational mechanism, limitations, differences in development environment, deployment settings, and troubleshooting tips.Dockerfile
: Updated to install Litestream, SQLite, and related tools. Modified database paths and added steps to handle database migration and backup. [1] [2]compose.yaml
: Updated volume and environment configurations to reflect the new database path.litestream.yml.template
: Added configuration for Litestream to replicate the database to Google Cloud Storage.run.sh
: Added a script to handle database restoration from Cloud Storage, ensure compatibility with Prisma, and start the application with Litestream replication.Documentation:
README.md
: Added a link to the architecture overview document for more detailed information on the new database backup and persistence strategy.