Ok, I updated my drawing, so the arrows are correct:
┌─────────────────────────────────────────────────────────────────┐ │ Browser │ └─────────────────────────────────────────────────────────────────┘ ▲ │ :443 │ :80 ▼ ┌────────────────────────────────────────────────────────────────┐ │ Proxy (traefik) │ └────────────────────────────────────────────────────────────────┘ ▲ ▲ ▲ │ │ │ │ :3000 │ :8085 │ :5001 │ │ │ ▼ ▼ ▼ ┌───────────────────────┐ ┌────────────────┐ ┌────────────────┐ │ DBgate (in docker) │ │ pgBackupWeb │ │ My custom app │ └───────────────────────┘ └────────────────┘ └────────────────┘ ▲ ▲ ▲ │ :5432 │ :5432 │ :5432 │ │ │ ▼ ▼ ▼ ┌────────────────────────────────────────────────────────────────┐ │ Database │ └────────────────────────────────────────────────────────────────┘
DbGate is connecting to my postgresql db. If I kill the container the communication is cut off. The ports 3000, 8089, 5001, 5432 are not open. How does DbGate load my postgres data then, if no backend? Sometimes I use it when my client messes up something thats only repairable in the db. Thats the exact scenario where its useful to run it in docker.
It’s right in their docs
Where? The app runs in the browser, but the data is still remote (from the pov of the browser)
just_another_person@lemmy.world 1 week ago
Again, no.
DBGate is an application running in your browser. Just like any other desktop application, except it’s code is executed in the browser, and not a standalone window. DBGate uses the runtime platform of your browser to execute code and create connections to the database you’re using. That’s where you’re getting confused. There is nothing running in the docker container except a dumb HTTP server that allows your browser to load the code to executed, just as if you had visited their website.
This same exact code can also be packaged to run in Electron as a standalone window in your desktop so it seems like its own app. Same exact code that runs in your browser, but using Electron to host and execute its code.
jogai_san@lemmy.world 1 week ago
Show me the docs. It really sounds like you’re confidentially incorrect :-)
The app part is indeed just running in the browser. But it needs the data over an external connection. Explain how it can read/write the data to me.
just_another_person@lemmy.world 1 week ago
I…don’t think I need to. It’s all open source. Here is the DBGate repo right here.
If you’re unfamiliar with all of this, that’s your job to get educated. This is how browser-based JS software works. The “proof” is right there in all it’s glory for you to peruse.
jogai_san@lemmy.world 1 week ago
You dont need to indeed, but since you mentioned them first.
I’m a software engineer from way before the js hype, so I think I’m properly educated thanks.
Indeed, here is the api part: github.com/dbgate/dbgate/tree/master/…/api
Markaos@discuss.tchncs.de 1 week ago
The browser version cannot connect to Postgres without a server-side part, for rather obvious reasons - you can’t just make arbitrary network connections from the browser. Electron build is of course different, as that doesn’t have to deal with the browser sandbox.
By the way, here’s a similar issue documented in Outerbase’s repo:
Not gonna lie, telling people how they need to get educated on stuff you don’t understand ticks me off.