-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Dev database with backup and restore scripts #141
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fab0ce3
to
eb54dc2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed this in favour of calling dotenv-cli
in the package.json
scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super exciting, thanks Daf!
Everything works for me locally, though I did run into some errors when running the scripts--I did have to update the end of line sequences from CRLF to LF. Do you know if there's a more OS-agnostic way of handling this?
Ah good catch @zz-hh-aa - we can fix this with a |
Worked great--thanks Daf 🙌 |
Hi @DafyddLlyr I could make it work locally fairly easily, thanks for setting this up! |
What does this PR do?
Comments
This PR sets up a local database, which has a copy of prod data. This means we can make local database changes, test them out, and then deploy those changes to the production database.
We're using Docker to containerise the local database, as well as the "dbtools" service which runs the backup and restore scripts.
In order for this to work, we'll need to use
.env.local
and.env.production
. Both of these files have been added to the Fairhold vault in 1Password - let me know if you have issues accessing these files.How do I test this out?
You'll need to have do install docker, configure env vars (see above) and then checkout this branch.
From here you should be able to take the following steps -
npm run backup
)npm run restore
)npm run dev
)npm run prisma:studio
)Please have a crack at this and we'll talk through all of this on the call Wednesday 👍
Architecture
Next steps...