• JakenVeina@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days ago

    Sick. I’ve tried a few times in the past to find a frontend for postgres that I liked, and was never able to. Will have to give this a try.

    • jogai_san@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 day ago

      Same.

      Only thing is, when I run it the postgresql driver is ‘invalid’. But I’m trying with an older version, like this:

      docker run --rm -it --name outerbase --network host -h outerbase.local chewcw/outerbase-studio:v0.9.2

    • zod000@lemmy.ml
      link
      fedilink
      English
      arrow-up
      5
      ·
      4 days ago

      Yeah, DBeaver used to be unusable, but it is quite decent these days. I was really unhappy with Datagrip, so I decided to give it another try and I am glad I did.

      As far as this tool goes, I don’t love the idea of having my tools in the browser, so this won’t work for me, but it is a cool project nonetheless.

      • jogai_san@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 days ago

        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
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          2
          ·
          3 days 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.worldOP
            link
            fedilink
            English
            arrow-up
            3
            ·
            3 days 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.

              • jogai_san@lemmy.worldOP
                link
                fedilink
                English
                arrow-up
                3
                ·
                3 days ago

                I…don’t think I need to.

                You dont need to indeed, but since you mentioned them first.

                If you’re unfamiliar with all of this, that’s your job to get educated.

                I’m a software engineer from way before the js hype, so I think I’m properly educated thanks.

                The “proof” is right there in all it’s glory for you to peruse.

                Indeed, here is the api part: https://github.com/dbgate/dbgate/tree/master/packages/api

                • just_another_person@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  arrow-down
                  2
                  ·
                  3 days ago

                  That is a LOCAL running interface. It’s not something being run as a server-side interface in the docker container.

                  I’m not sure what point you’re trying to make, but at this point, you’re original concern and question has been answered.

              • Markaos@discuss.tchncs.de
                link
                fedilink
                English
                arrow-up
                2
                arrow-down
                1
                ·
                3 days ago

                If you’re unfamiliar with all of this, that’s your job to get educated. This is how browser-based JS software works.

                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:

                Outerbase Studio Desktop is a lightweight Electron wrapper for the Outerbase Studio web version. It enables support for drivers that aren’t feasible in a browser environment, such as MySQL and PostgreSQL.

                Not gonna lie, telling people how they need to get educated on stuff you don’t understand ticks me off.

                • jogai_san@lemmy.worldOP
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  2 days ago

                  Not gonna lie, telling people how they need to get educated on stuff you don’t understand ticks me off.

                  Thanks for backing me up. The fediverse needs to grow because this way it allows for people to be spout nonsense without being corrected by peers.

                  Btw, had outerbase running trough docker, but could not figure out a way to connect to my own pSql yet…

                • just_another_person@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  arrow-down
                  2
                  ·
                  2 days ago

                  I don’t even know where to begin with this 😂

                  You had better alert the Internet at large and the developers of the apps being discussed here to let them that the very product they build is impossible then.

                  Oh…wait: https://reintech.io/blog/using-node-js-to-access-remote-database

                  A very basic example on how to do the very thing you said is not possible you say? While you’re at it, you better go alert Zoom, Google, Microsoft, and anyone else with a WebRTC app that they aren’t allowed to make connections to other things from the browser. It’s totally against the rules and impossible.

                  🤣

      • 8osm3rka@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        edit-2
        4 days ago

        An electron app still needs to be served by a web server, even if the actual business logic is all client-side

        EDIT: Electron, not React…

        • just_another_person@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 days ago

          No? This is a client-side electron app. You’d need something to load the initial files, but that’s it. There are no server-side running parts. Even still, there’s links in the project here to load up the app right there. Each Major browser has ways to “install” such apps from there.

          • jogai_san@lemmy.worldOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 days ago

            Well, I assume there is a backend which takes care of securely connecting to the databases. That way I can connect the backend to the internal network where I can connect to the database, and without exposing the database port still use this from the browser.

            • just_another_person@lemmy.world
              link
              fedilink
              English
              arrow-up
              3
              ·
              3 days ago

              Huh? This is a database client. There is no backend. You point it to a database, and it connects to the database. That’s all it does.

              I’m not sure what other backend you may be referring to, but it will use whatever network your desktop is using for comms.

                • just_another_person@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  3 days ago

                  Yup. This is just a straightforward client. Unfamiliar with dbgate but just looked at the docs. It’s also just a client as well. Unsure what other backend service you may have been referring to.