KBVE / kbve

KBVE Monorepo
https://kbve.com/
12 stars 12 forks source link

[Question] : Do you use the chart at migrations/kube/charts/kilobase/supabase on production? #3322

Open nthtrung09it opened 3 days ago

nthtrung09it commented 3 days ago

Hi, I checked your repo and saw that you are using supabase with helm chart. Are you using that helm chart (at migrations/kube/charts/kilobase/supabase) in your production?

How can you mount the kilobase-configmap.yaml and kilobase-additional-sql.yaml so that the supabase/postgres can read it?

Thanks in advance.

h0lybyte commented 3 days ago

You have to mount it using the cnpg operator and the init command the first time, just to get the whole db started up with the right tables.

Furthermore, we built our own custom supabase postgres image using their base image and added in the cnpg plugins, such as barman.

Finally after the db is running with 3 replicas, as a cluster from the init deployment, you can:

A) Use barman to back the db up to a s3 bucket and turn off the server, then spin it back up but this time with a migration. B) Start another db cluster with the migration command and point the backups to the init.

After A or B, you then basically manage the db cluster through migrations.

The s3 bucket costs for <1000 users is about $0.04 a month.