blueI shoved out a big updated, though it's not ready for deployment yet
blueupdate*
blueif you do wish to have a look at it locally, you need a local postgres db which you can configure in .env.local
blueI got the git stuff mostly done for browsing files, now doing items / apps
phalethok, is the update on master branch? looks like master is 1 month old
blueyes. I've squashed and force-pushed, so it would show that way
phalethah, ok, I see the nested css
blueyeah, there's still a lot of nonsense I need to clean up
phalethwell, I gotta figure out how to run rootful podman without sudo
blueya
phalethguess using tcp instead of unix sockets should do
blueso once I finish the items view, I'll do the apps view. and then we'll need the podman api to work
bluewe also need ssh to work on port 22 on repopack.com
bluethat can happen later, but we do need it
blueby which I meant git+ssh, using the git@ user
blueso you can do `git clone git@repopack.com/primate/primate`
blueI mean `git clone git@repopack.com:primate/primate`
bluethe rp repo itself will be under the repopack org, /web, I think
bluethen we can move everything else from gitea
phalethprolly only a git user is needed the, doesn't need to have sudo privs or really shouldn't need sudo privs at all
blueyes
phalethcause ssh connectivity is available to repopack.com
blueyes. we only need to figure how we map the paths, you know?
blueso git clone git@repopack.com/repopack/web needs to map to wherever the repo is. and the problem is we need to check for permissions
phalethonly haproxy comes to mind atm, cause ssh is tcp
blueugh, I keep writing / instead of :
blueso we need to pass those git operations through a filter that checks against the db, that's the only difficult part
phalethcheck for permissions against database user?
bluein the past, when I was doing adaptivecloud, I used the ssh2 package for it
blueyes
phalethI mean, somebody stored in user tables
blueyou need to know if you have permissions to clone the repo / write to it
bluefor that, you need to query the postgres db
phalethah, well, so you need a tcp proxy for node/deno
blueprobably, yes. because, we need to do this:
phalethcause dynamic processing is hard to do with haproxy
bluesomeone uses git clone (or git push) -> we see a pubkey -> pubkey is in db -> we map pubkey to user -> we check if user has permissions to access the repo
phalethhaproxy will just send the path to the tcp proxy behind it
bluethat's fair. the complexity is that haproxy needs to hand in the pubkey
bluesince that's the user identifier here
phalethif it's in a header then that's done automatically
bluecan haproxy do that?
blueI don't think it's in the header, it's a tcp request
phalethoh, right, ssh
blueit's part of the ssh protocol which extends tcp
bluecould haproxy forward the request completely to a backend running ssh2, *if* the user is git?
bluethat would be nice
phalethhaproxy already does that for gitea
blueok, then that's what we're gonna do
phalethit's just the git user is within the gitea container
bluewe could have a git user inside the repopack/web container, too
phalethand so it could be the same for repopack I guess, just run the thing within container
blueyes
blueit would need to be an additional port exposed by the container, but that's ok
phaleththe beauty of ssh is that it's already secure, so there is no need for haproxy to interfere with the traffic and so the repopack website app can do whatever it needs to do
phalethjust like gitea does
blueright. but the reason I was wary to use ssh2 was that it essentially reimplements openssh
bluebut if it runs inside the container I suppose that's ok
bluewe need programmatic ssh, either way
phalethwell, if you really want port 22 then we can reconfigure the openssh server running on the host and put the alternative port number to our ~/.ssh/config on our client machines
phalethso that 22 is free for haproxy to use
blueyes, that's the idea
bluethat way `git clone git@repopack.com:repopack/web` just works
phalethI did 2200 or whatever for gitea cause I don't think it should be made available to like normal public anyway
blueyeah
phalethok, configuring openssh server is easy
bluecool
bluebtw, if you're testing the repopack repo locally, you can add this to your .git/config:
blueand replace the url by your local path to the project
bluethen you boot up the app, create a primate namespace, create a primate project in it, then `git push local` inside your checkout of the primate repo
phalethmight wanna add that to readme
bluethen you can see how it looks
bluek
bluewill do shortly
bluephaleth: I've pushed out instructions, tell me if it's coherent to you