goniszewski / grimoire

Bookmark manager for the wizards 🧙
https://grimoire.pro
MIT License
1.99k stars 58 forks source link

Bookmark images are fetched from 127.0.0.1 only #13

Closed jonrick closed 10 months ago

jonrick commented 10 months ago

It appears that bookmark images are hardcoded to fetch from 127.0.0.1 with no way to configure the actual pocketbase url.

Screenshot 2023-11-26 124014

I have confirmed that the application url is set correctly in pocketbase's settings.

goniszewski commented 10 months ago

URLs for images are fetched from PocketBase and, if stored by it, from its domain. You can update the URL for PB by changing the value of PUBLIC_POCKETBASE_URL from the default http://grimoire-pocketbase:80 in .env.docker (or .env if you're using run-dev.sh script).

I hope this resolves your issue!

jonrick commented 10 months ago

@goniszewski I tracked it down to: https://github.com/goniszewski/grimoire/blob/355aaf58a80a4d456f24117dcc796803357d4495/src/lib/config.ts#L2

I wasn't able to quickly figure out how to set VITE_PB_URL so I just swapped in my domain in for the localhost address (127.0.0.1) and was able to stand up my instance - a Band-Aid but at least I'm up running and using the project!

goniszewski commented 10 months ago

@jonrick an interesting find. I will look into it tomorrow and update you here!

In the meantime, here’s more on VITE_ envs: https://vitejs.dev/guide/env-and-mode

goniszewski commented 10 months ago

@jonrick I forgot to mention it earlier: https://github.com/goniszewski/grimoire/pull/17 fixes this issue and some related ones.

I will merge it soon (after additional validation).

jonrick commented 10 months ago

@goniszewski I actually grabbed it a few minutes ago from that branch and am deploying to test it out! :D

jonrick commented 10 months ago

@goniszewski so far it's look pretty darn good!

goniszewski commented 10 months ago

This issue should be now resolved.