rename closed to whitelisted and build it and basic with musl.

This commit is contained in:
fiatjaf 2022-07-24 11:52:11 -03:00
parent d2ce4dbf54
commit 84f7d34840
14 changed files with 14 additions and 14 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
relayer
*.env

1
basic/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
relayer-basic

View File

@ -1,2 +1,2 @@
relayer: $(shell find .. -name "*.go")
go build -ldflags="-s -w" -o ./relayer
relayer-basic: $(shell find .. -name "*.go")
CC=$$(which musl-gcc) go build -ldflags='-s -w -linkmode external -extldflags "-static"' -o ./relayer-basic

View File

@ -1,16 +1,16 @@
basic relayer
relayer basic
=============
- a basic relay implementation based on relayer.
- uses postgres, which I think must be over version 12 since it uses generated columns.
- it has some antispam limits, tries to delete old stuff so things don't get out of control, and some other small optimizations, but it's something we can call "hardened".
- it has some antispam limits, tries to delete old stuff so things don't get out of control, and some other small optimizations.
running
-------
grab a binary from the releases page and run it with the environment variable POSTGRESQL_DATABASE set to some postgres url:
POSTGRESQL_DATABASE=postgres://name:pass@localhost:5432/dbname ./relayer
POSTGRESQL_DATABASE=postgres://name:pass@localhost:5432/dbname ./relayer-basic
it also accepts a HOST and a PORT environment variables.
@ -19,6 +19,6 @@ compiling
if you know Go you already know this:
go get github.com/fiatjaf/relayer/basic
go install github.com/fiatjaf/relayer/basic
or something like that.

View File

@ -1 +0,0 @@
closedrelay

View File

@ -1,2 +0,0 @@
closedrelay: $(shell find .. -name "*.go")
go build -ldflags="-s -w" -o ./closedrelay

1
whitelisted/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
relayer-whitelisted

2
whitelisted/Makefile Normal file
View File

@ -0,0 +1,2 @@
relayer-whitelisted: $(shell find .. -name "*.go")
CC=$$(which musl-gcc) go build -ldflags='-s -w -linkmode external -extldflags "-static"' -o ./relayer-whitelisted

View File

@ -1,5 +1,5 @@
closed relay
============
whitelisted relay
=================
- a basic relay implementation based on relayer.
- uses postgres, which I think must be over version 12 since it uses generated columns.
@ -10,7 +10,7 @@ running
grab a binary from the releases page and run it with the environment variable POSTGRESQL_DATABASE set to some postgres url:
POSTGRESQL_DATABASE=postgres://name:pass@localhost:5432/dbname ./closedrelay
POSTGRESQL_DATABASE=postgres://name:pass@localhost:5432/dbname ./relayer-whitelisted
it also accepts a HOST and a PORT environment variables.
@ -19,6 +19,6 @@ compiling
if you know Go you already know this:
go install github.com/fiatjaf/relayer/closedrelay
go install github.com/fiatjaf/relayer/whitelisted
or something like that.