i'm not sure why, usually this kind of problem comes from the go module cache, but the solution that fixes all of the problems is "go mod tidy"

it may have something to do with the particular docker image you build from, but for sure tidy is the general solution

the best way to do this kind of thing in Go in docker is to do this in the docker:

export GOBIN="$HOME/.local/bin"

go install mleku.net/replicatr@latest

some versions of linux don't have that set as a default in $PATH but you can just directly call it $HOME/.local/bin/replicatr

it's not hard to set that stuff up in the dockerfile

Reply to this note

Please Login to reply.

Discussion

Thanks, I'll check this tomorrow Morning and let you know 🙏⚡

i'll do more work on it, i bumped into several issues and i will add a dockerfile so you can just run that and it works, shouldn't take me long to do

i'm quite excitedly working on a custom noise protocol custom suite that uses bitcoin/nostr (sha256/secp256k1/schnorr) right now, but i'll make this dockerfile for you to make it easy

"go mod tidy" worked like a charm!

testing event creation with this note....

Live note: https://nostrrr.com/relay/replicatr.fractalized.net

Working! ⚡️

i just got up to see a waitgroup negative counter panic so there may be some edge case in there still

today's presentation has been postponed due to family stuff with my boss so likely a long time for me to catch this one, but probably i'll snap it today

Nice!

I modified to entrypoint to retrieve docker env used into the docker compose and create the config file before replicatr run. I'll setup my gitea today and will send you the repo link ⚡

if you are using the @latest like i recommended, when you run the dockerfile now it will patch to a version that has the fix for that waitgroup panic... it was an edge case because it was triggered by clients sending malformed messages repeatedly (it ignores them after 16 messages wrong) i'm not sure that i've written that code correctly but for sure the waitgroup done in that clause causes two decrements of the counter which makes it go negative when a client keeps sending garbage

Obviously I don't (just used tidy) 😅

Will try @latest and let you know!

oh, also, it by default exits on first run after creating configuration

also currently it listens on a localhost address but that's probably no big deal unless 4869 is already bound

i had written it to have multiple listeners and for whatever reason that was buggering up the compilation but i'll fix it at some point