Coder Social home page Coder Social logo

BACKEND_URL & POCKETBASE_URL about grimoire HOT 8 CLOSED

tamaskan avatar tamaskan commented on June 18, 2024
BACKEND_URL & POCKETBASE_URL

from grimoire.

Comments (8)

goniszewski avatar goniszewski commented on June 18, 2024 3

I have removed BACKEND_URL completely, so now there's only POCKETBASE_URL config option (PUBLIC_POCKETBASE_URL in .env) that defaults to http://localhost:8090.

Currently, only the URLs to files stored in PB are proxied through the app instance, but my goal is to proxy all PB calls through Grimoire itself - it will further simplify networking in the deployed project.

Edit: I will close this issue now, but you are welcome to create another one for related problems/questions.

from grimoire.

goniszewski avatar goniszewski commented on June 18, 2024

Hello @tamaskan! These two values are poorly named, I admit it. If the PB is being deployed by Docker Compose method, the BACKEND_URL will be different from POCKETBASE_URL, but if the app is run in dev mode (or the PB instance is an external one), the URL will be the same.

I want to simplify the configuration and the deployment process in the near future.

from grimoire.

tamaskan avatar tamaskan commented on June 18, 2024

Ah, okay. I am currently trying to use an internal pocketbase-installation, but when i enter the url in pocketbase_url, the healthcheck uses that too and the login fails with "405 method not allowed"

from grimoire.

tamaskan avatar tamaskan commented on June 18, 2024

using my public installation the login-url (http 303) returns a blank token ( pb_auth=%7B%22token%22%3A%22%22%2C%22model%22%3A%7B%7D%7D; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict ) and the page just refreshes. Couldn't find any errors inside the pocketbase-admin or container-logs

from grimoire.

tamaskan avatar tamaskan commented on June 18, 2024

scratch that. since grimoir uses the internal proxy, cookie based sso fails (in my case with a 303 redirect).

from grimoire.

SrGeneroso avatar SrGeneroso commented on June 18, 2024

I'm not sure if the docs are outdated or if is related to this conversation, but the docker example, when you don't change the .env.example defaults, it doesn't work.
I think is related to this setting.

# Set it if you're using external PocketBase installation (default: http://localhost:8090)
# Example: PUBLIC_POCKETBASE_URL=https://grimoire.mydomain.com:8090
PUBLIC_POCKETBASE_URL=

which doesn't default to localhost but to pocketbase:80
image

Is that correct? the issue comes that the dashboard can't connect to pocketbase
image
because is trying to reach a "domain" instead of localhost
image

from grimoire.

tamaskan avatar tamaskan commented on June 18, 2024

does the pocketbase-connection override the auth-header ? i wanted to use something like https://user:[email protected]/pb

from grimoire.

goniszewski avatar goniszewski commented on June 18, 2024

@SrGeneroso It's failing for me too - calling it (PocketBase) directly from the app container on http://pocketbase/api/health also doesn't work. I will look into this today.

@tamaskan PB does use Authorization: TOKEN header approach to handle authentication.

from grimoire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.