theopensystemslab / fairhold-dashboard

https://fairhold-dashboard.vercel.app
0 stars 0 forks source link

feat: Create backup script #115

Open DafyddLlyr opened 1 week ago

DafyddLlyr commented 1 week ago

What does this PR do?

Changes to .env files

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fairhold-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 1:53pm
zz-hh-aa commented 1 week ago

Thanks Daf--I tried npm run backup but encountered this error:

> fairhold-dashboard@0.1.0 backup
> ./scripts/backup.sh

'.' is not recognized as an internal or external command,
operable program or batch file.

Not quite sure what the issue is--I tried it again, leaving out the ./ in ./scripts... but got the same thing ('scripts' is not recognized as an internal or external command, operable program or batch file.)

Any ideas what the issue might be?

zz-hh-aa commented 1 week ago

Ah-ha, Windows strikes again... do you think you could update with cross-env or shx and add to the script eg "cross-env ./scripts/backup.sh"? I guess we'll need this for the test:coverage script too.

DafyddLlyr commented 1 week ago

Thanks @zz-hh-aa - looks like it's a Unix vs. Windows issue maybe - does the latest commit work locally for you?

zz-hh-aa commented 1 week ago

Alas no @DafyddLlyr

Processing fstab with mount -a failed.
Failed to mount C:\, see dmesg for more details.

<3>WSL (9) ERROR: CreateProcessEntryCommon:334: getpwuid(0) failed 2
<3>WSL (9) ERROR: CreateProcessEntryCommon:505: execvpe /bin/bash failed 2
<3>WSL (9) ERROR: CreateProcessEntryCommon:508: Create process not expected to return
DafyddLlyr commented 1 week ago

Thanks for testing - I'll take a look at using a docker container for this. I think we'll need one for a local dev db anyway.

zz-hh-aa commented 1 week ago

This worked for me now, but I did have to change .env.local to .env, which I guess means we'll also have to update this line in load-env-and-prisma.js: require("dotenv").config({ path: ".env.local" });