CI action fails on db migration
steve-jiang opened this issue Β· comments
First of all, thank you so much for this boilerplate. It has been awesome for someone like me who isn't familiar with how to create a SaaS from the beginning. π
I have been using the repo to learn and got the below error in actions for CI:
saas-boilerplate@1.4.0 db:migrate
> dotenv -c -- tsx ./scripts/dbMigrate.ts
Migration started
Migration failed
LibsqlError: SERVER_ERROR: Server returned HTTP status 401
This might be dumb question but what is the intended behaviour for CI regarding the DB? In the .env
file, it says Please use a working DATABASE_URL.
, are we suppose to use the real turso db here? Or should the value come from Github secrets?
My understanding is that if the DATABASE_URL
is remote, then we'd also need to specify the DATABASE_AUTH_TOKEN
and I assume this is what causes the 401 error.
Or, are we supposed to use local db for the CI but then what are the right places for the envs?
Thank you for your comments.
By default, without any changes and configuration, the CI should pass.
It seems I need to update the comment, it should be irrelevant now. I'll update the comment next week.
Yes, if DATABASE_URL is not local, you need to specify DATABASE_AUTH_TOKEN.
Hope now it's clear.
Thanks @ixartz π