Migrate to dual bucket architecture
Learn how to migrate from single bucket to dual bucket architecture
In order to make MediaLit truly vendor agnostic, we decided to move from a single bucket architecture to a dual bucket architecture.
This is based on our years of learning from running MediaLit in production and all the community feedback we have received over the years.
Why dual bucket architecture?
This makes the architecture portable across cloud providers. We discovered that providers like Backblaze B2 does not support hosting both private and public files in the same bucket.
How to migrate to dual bucket architecture?
-
Create new buckets as detailed in Self hosting section.
-
Copy data from the old bucket to the new bucket. To do this, you will have to checkout MediaLit's Git repo, then do the following in the terminal
- Upgrade the MediaLit DB by running the following migration, by logging into your MediaLit's database and copy pasting the content of the file.
.migrations/00005-migrate-to-dual-bucket-architecture
- Update .env file for the MediaLit API container.
- Re-deploy the MediaLit API container.