diff --git a/.gitignore b/.gitignore index 580b408..622a1ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ - # Created by https://www.toptal.com/developers/gitignore/api/go,visualstudiocode # Edit at https://www.toptal.com/developers/gitignore?templates=go,visualstudiocode @@ -36,4 +35,8 @@ .history .ionide -# End of https://www.toptal.com/developers/gitignore/api/go,visualstudiocode \ No newline at end of file +# End of https://www.toptal.com/developers/gitignore/api/go,visualstudiocode + +# Local files +env/actor.pem +env/config.yml diff --git a/Dockerfile b/Dockerfile index 80c80cf..cf90ada 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.19-alpine AS build +FROM golang:1.18-alpine AS build WORKDIR /Activity-Relay -COPY . /Activity-Relay +COPY ./app /Activity-Relay RUN mkdir -p /rootfs/usr/bin && \ apk add -U --no-cache git && \ @@ -9,6 +9,9 @@ RUN mkdir -p /rootfs/usr/bin && \ FROM alpine +COPY ./actor.pem /var/lib/relay/ + COPY --from=build /rootfs/usr/bin /usr/bin RUN chmod +x /usr/bin/relay && \ apk add -U --no-cache ca-certificates +EXPOSE 8080 \ No newline at end of file diff --git a/api/api.go b/app/api/api.go similarity index 100% rename from api/api.go rename to app/api/api.go diff --git a/api/api_test.go b/app/api/api_test.go similarity index 100% rename from api/api_test.go rename to app/api/api_test.go diff --git a/api/decode.go b/app/api/decode.go similarity index 100% rename from api/decode.go rename to app/api/decode.go diff --git a/api/decode_test.go b/app/api/decode_test.go similarity index 100% rename from api/decode_test.go rename to app/api/decode_test.go diff --git a/api/handle.go b/app/api/handle.go similarity index 100% rename from api/handle.go rename to app/api/handle.go diff --git a/api/handle_test.go b/app/api/handle_test.go similarity index 100% rename from api/handle_test.go rename to app/api/handle_test.go diff --git a/control/config.go b/app/control/config.go similarity index 100% rename from control/config.go rename to app/control/config.go diff --git a/control/config_test.go b/app/control/config_test.go similarity index 100% rename from control/config_test.go rename to app/control/config_test.go diff --git a/control/control.go b/app/control/control.go similarity index 100% rename from control/control.go rename to app/control/control.go diff --git a/control/control_test.go b/app/control/control_test.go similarity index 100% rename from control/control_test.go rename to app/control/control_test.go diff --git a/control/domain.go b/app/control/domain.go similarity index 100% rename from control/domain.go rename to app/control/domain.go diff --git a/control/domain_test.go b/app/control/domain_test.go similarity index 100% rename from control/domain_test.go rename to app/control/domain_test.go diff --git a/control/follow.go b/app/control/follow.go similarity index 100% rename from control/follow.go rename to app/control/follow.go diff --git a/control/follow_test.go b/app/control/follow_test.go similarity index 100% rename from control/follow_test.go rename to app/control/follow_test.go diff --git a/control/utils.go b/app/control/utils.go similarity index 100% rename from control/utils.go rename to app/control/utils.go diff --git a/control/utils_test.go b/app/control/utils_test.go similarity index 100% rename from control/utils_test.go rename to app/control/utils_test.go diff --git a/deliver/deliver.go b/app/deliver/deliver.go similarity index 100% rename from deliver/deliver.go rename to app/deliver/deliver.go diff --git a/deliver/deliver_test.go b/app/deliver/deliver_test.go similarity index 100% rename from deliver/deliver_test.go rename to app/deliver/deliver_test.go diff --git a/deliver/logger.go b/app/deliver/logger.go similarity index 100% rename from deliver/logger.go rename to app/deliver/logger.go diff --git a/deliver/sender.go b/app/deliver/sender.go similarity index 86% rename from deliver/sender.go rename to app/deliver/sender.go index de0fe93..2a74a70 100644 --- a/deliver/sender.go +++ b/app/deliver/sender.go @@ -7,16 +7,21 @@ import ( "fmt" "net/http" "time" + "strings" httpdate "github.com/Songmu/go-httpdate" "github.com/go-fed/httpsig" "github.com/sirupsen/logrus" ) +// See https://github.com/mastodon/mastodon/pull/14556 +const ONEHOUR = 60 * 60 + func appendSignature(request *http.Request, body *[]byte, KeyID string, privateKey *rsa.PrivateKey) error { request.Header.Set("Host", request.Host) - - signer, _, err := httpsig.NewSigner([]httpsig.Algorithm{httpsig.RSA_SHA256}, httpsig.DigestSha256, []string{httpsig.RequestTarget, "Host", "Date", "Digest", "Content-Type"}, httpsig.Signature) + request.Header.Set("(request-target)", fmt.Sprintf("%s %s", strings.ToLower(request.Method), request.URL.Path)) + + signer, _, err := httpsig.NewSigner([]httpsig.Algorithm{httpsig.RSA_SHA256}, httpsig.DigestSha256, []string{httpsig.RequestTarget, "Host", "Date", "Digest", "Content-Type"}, httpsig.Signature, ONEHOUR) if err != nil { return err } diff --git a/deliver/sender_test.go b/app/deliver/sender_test.go similarity index 100% rename from deliver/sender_test.go rename to app/deliver/sender_test.go diff --git a/go.mod b/app/go.mod similarity index 95% rename from go.mod rename to app/go.mod index 6eadf5a..619481b 100644 --- a/go.mod +++ b/app/go.mod @@ -1,17 +1,18 @@ -module github.com/yukimochi/Activity-Relay +module github.com/lilfade/Activity-Relay/app -go 1.19 +go 1.18 require ( github.com/RichardKnop/machinery v1.10.0 github.com/Songmu/go-httpdate v1.0.0 - github.com/go-fed/httpsig v0.1.1-0.20200204213531-0ef28562fabe + github.com/go-fed/httpsig v1.1.0 github.com/go-redis/redis v6.15.9+incompatible github.com/patrickmn/go-cache v2.1.0+incompatible github.com/satori/go.uuid v1.2.0 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.13.0 + github.com/lilfade/Activity-Relay v1.1.1 ) require ( @@ -19,7 +20,6 @@ require ( cloud.google.com/go/compute v1.12.1 // indirect cloud.google.com/go/compute/metadata v0.2.1 // indirect cloud.google.com/go/iam v0.7.0 // indirect - cloud.google.com/go/kms v1.6.0 // indirect cloud.google.com/go/pubsub v1.8.3 // indirect github.com/RichardKnop/logging v0.0.0-20190827224416-1a693bdd4fae // indirect github.com/aws/aws-sdk-go v1.35.35 // indirect diff --git a/go.sum b/app/go.sum similarity index 99% rename from go.sum rename to app/go.sum index 99170e1..d99d7a4 100644 --- a/go.sum +++ b/app/go.sum @@ -35,7 +35,6 @@ cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1 cloud.google.com/go/iam v0.7.0 h1:k4MuwOsS7zGJJ+QfZ5vBK8SgHBAvYN/23BWsiihJ1vs= cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= cloud.google.com/go/kms v1.6.0 h1:OWRZzrPmOZUzurjI2FBGtgY2mB1WaJkqhw6oIwSj0Yg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= cloud.google.com/go/longrunning v0.1.1 h1:y50CXG4j0+qvEukslYFBCrzaXX0qpFbBzc3PchSu/LE= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= @@ -92,8 +91,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/go-fed/httpsig v0.1.1-0.20200204213531-0ef28562fabe h1:U71giCx5NjRn4Lb71UuprPHqhjxGv3Jqonb9fgcaJH8= -github.com/go-fed/httpsig v0.1.1-0.20200204213531-0ef28562fabe/go.mod h1:T56HUNYZUQ1AGUzhAYPugZfp36sKApVnGBgKlIY+aIE= +github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI= +github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -345,6 +344,8 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yukimochi/Activity-Relay v1.1.1 h1:veyqMC5OtDArnq0xdSWi2+XGngw+UCb2fqNjeqnN1FI= +github.com/yukimochi/Activity-Relay v1.1.1/go.mod h1:7V4Oxkkv/eXgHDeC5B5SH98eKvgNcBqPrH5dv90IwB8= go.mongodb.org/mongo-driver v1.4.3 h1:moga+uhicpVshTyaqY9L23E6QqwcHRUv1sqyOsoyOO8= go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -358,7 +359,6 @@ go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= go.opentelemetry.io/otel v0.14.0 h1:YFBEfjCk9MTjaytCNSUkp9Q8lF7QJezA06T71FbQxLQ= go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw= -golang.org/x/crypto v0.0.0-20180527072434-ab813273cd59/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -469,7 +469,6 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180525142821-c11f84a56e43/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -523,6 +522,7 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdp golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/main.go b/app/main.go similarity index 69% rename from main.go rename to app/main.go index 35b8779..1f6fe90 100644 --- a/main.go +++ b/app/main.go @@ -1,42 +1,3 @@ -/* -Yet another powerful customizable ActivityPub relay server written in Go. - -Run Activity-Relay - -API Server - ./Activity-Relay --config /path/to/config.yml server -Job Worker - ./Activity-Relay --config /path/to/config.yml worker -CLI Management Utility - ./Activity-Relay --config /path/to/config.yml control - -Config - -YAML Format - ACTOR_PEM: /var/lib/relay/actor.pem - REDIS_URL: redis://localhost:6379 - RELAY_BIND: 0.0.0.0:8080 - RELAY_DOMAIN: relay.toot.yukimochi.jp - RELAY_SERVICENAME: YUKIMOCHI Toot Relay Service - JOB_CONCURRENCY: 50 - RELAY_SUMMARY: | - YUKIMOCHI Toot Relay Service is Running by Activity-Relay - RELAY_ICON: https://example.com/example_icon.png - RELAY_IMAGE: https://example.com/example_image.png -Environment Variable - -This is Optional : When config file not exist, use environment variables. - - ACTOR_PEM - - REDIS_URL - - RELAY_BIND - - RELAY_DOMAIN - - RELAY_SERVICENAME - - JOB_CONCURRENCY - - RELAY_SUMMARY - - RELAY_ICON - - RELAY_IMAGE - -*/ package main import ( @@ -46,10 +7,10 @@ import ( "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/yukimochi/Activity-Relay/api" - "github.com/yukimochi/Activity-Relay/control" - "github.com/yukimochi/Activity-Relay/deliver" - "github.com/yukimochi/Activity-Relay/models" + "github.com/lilfade/Activity-Relay/app/api" + "github.com/lilfade/Activity-Relay/app/control" + "github.com/lilfade/Activity-Relay/app/deliver" + "github.com/lilfade/Activity-Relay/app/models" ) var ( diff --git a/misc/dist/init/relay-api.service b/app/misc/dist/init/relay-api.service similarity index 100% rename from misc/dist/init/relay-api.service rename to app/misc/dist/init/relay-api.service diff --git a/misc/dist/init/relay-worker.service b/app/misc/dist/init/relay-worker.service similarity index 100% rename from misc/dist/init/relay-worker.service rename to app/misc/dist/init/relay-worker.service diff --git a/misc/test/announce.json b/app/misc/test/announce.json similarity index 100% rename from misc/test/announce.json rename to app/misc/test/announce.json diff --git a/misc/test/application.json b/app/misc/test/application.json similarity index 100% rename from misc/test/application.json rename to app/misc/test/application.json diff --git a/misc/test/blankConfig.json b/app/misc/test/blankConfig.json similarity index 100% rename from misc/test/blankConfig.json rename to app/misc/test/blankConfig.json diff --git a/misc/test/config.yml b/app/misc/test/config.yml similarity index 100% rename from misc/test/config.yml rename to app/misc/test/config.yml diff --git a/misc/test/create.json b/app/misc/test/create.json similarity index 100% rename from misc/test/create.json rename to app/misc/test/create.json diff --git a/misc/test/exampleConfig.json b/app/misc/test/exampleConfig.json similarity index 100% rename from misc/test/exampleConfig.json rename to app/misc/test/exampleConfig.json diff --git a/misc/test/follow.json b/app/misc/test/follow.json similarity index 100% rename from misc/test/follow.json rename to app/misc/test/follow.json diff --git a/misc/test/followAsActor.json b/app/misc/test/followAsActor.json similarity index 100% rename from misc/test/followAsActor.json rename to app/misc/test/followAsActor.json diff --git a/misc/test/person.json b/app/misc/test/person.json similarity index 100% rename from misc/test/person.json rename to app/misc/test/person.json diff --git a/misc/test/service.json b/app/misc/test/service.json similarity index 100% rename from misc/test/service.json rename to app/misc/test/service.json diff --git a/misc/test/testKey.pem b/app/misc/test/testKey.pem similarity index 100% rename from misc/test/testKey.pem rename to app/misc/test/testKey.pem diff --git a/misc/test/undo.json b/app/misc/test/undo.json similarity index 100% rename from misc/test/undo.json rename to app/misc/test/undo.json diff --git a/misc/test/unfollow.json b/app/misc/test/unfollow.json similarity index 100% rename from misc/test/unfollow.json rename to app/misc/test/unfollow.json diff --git a/models/config.go b/app/models/config.go similarity index 100% rename from models/config.go rename to app/models/config.go diff --git a/models/config_test.go b/app/models/config_test.go similarity index 100% rename from models/config_test.go rename to app/models/config_test.go diff --git a/models/models.go b/app/models/models.go similarity index 100% rename from models/models.go rename to app/models/models.go diff --git a/models/models_test.go b/app/models/models_test.go similarity index 100% rename from models/models_test.go rename to app/models/models_test.go diff --git a/models/state.go b/app/models/state.go similarity index 100% rename from models/state.go rename to app/models/state.go diff --git a/models/state_test.go b/app/models/state_test.go similarity index 100% rename from models/state_test.go rename to app/models/state_test.go diff --git a/models/utils.go b/app/models/utils.go similarity index 100% rename from models/utils.go rename to app/models/utils.go diff --git a/models/utils_test.go b/app/models/utils_test.go similarity index 100% rename from models/utils_test.go rename to app/models/utils_test.go diff --git a/docker-compose.yml b/docker-compose.yml index 458016f..50c8b72 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,26 +10,30 @@ services: worker: build: . - image: yukimochi/activity-relay + image: ungodlyfaded/activity-relay working_dir: /var/lib/relay restart: always init: true command: relay worker volumes: - - "./actor.pem:/var/lib/relay/actor.pem" - - "./config.yml:/var/lib/relay/config.yml" + - "./env/actor.pem:/var/lib/relay/actor.pem" + - "./env/config.yml:/var/lib/relay/config.yml" depends_on: - redis + ports: + - 8082:8080 server: build: . - image: yukimochi/activity-relay + image: ungodlyfaded/activity-relay working_dir: /var/lib/relay restart: always init: true command: relay server volumes: - - "./actor.pem:/var/lib/relay/actor.pem" - - "./config.yml:/var/lib/relay/config.yml" + - "./env/actor.pem:/var/lib/relay/actor.pem" + - "./env/config.yml:/var/lib/relay/config.yml" depends_on: - redis + ports: + - 8081:8080 diff --git a/docs/ayame.png b/docs/ayame.png deleted file mode 100644 index 2b7e075..0000000 Binary files a/docs/ayame.png and /dev/null differ diff --git a/readme.md b/readme.md index 766d569..0104871 100644 --- a/readme.md +++ b/readme.md @@ -2,39 +2,37 @@ ## Yet another powerful customizable ActivityPub relay server written in Go. -[![GitHub Actions](https://github.com/yukimochi/activity-relay/workflows/Test/badge.svg)](https://github.com/yukimochi/Activity-Relay) -[![codecov](https://codecov.io/gh/yukimochi/Activity-Relay/branch/master/graph/badge.svg)](https://codecov.io/gh/yukimochi/Activity-Relay) -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fyukimochi%2FActivity-Relay.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fyukimochi%2FActivity-Relay?ref=badge_shield) +### Original Author: -![Powered by Ayame](docs/ayame.png) +> [yukimochi](https://github.com/yukimochi/Activity-Relay) -## Packages +### Packages - - `github.com/yukimochi/Activity-Relay` - - `github.com/yukimochi/Activity-Relay/api` - - `github.com/yukimochi/Activity-Relay/deliver` - - `github.com/yukimochi/Activity-Relay/control` - - `github.com/yukimochi/Activity-Relay/models` +- `github.com/lilfade/Activity-Relay/app` +- `github.com/lilfade/Activity-Relay/app/api` +- `github.com/lilfade/Activity-Relay/app/deliver` +- `github.com/lilfade/Activity-Relay/app/control` +- `github.com/lilfade/Activity-Relay/app/models` -## Requirements +### Requirements - - [Redis](https://github.com/antirez/redis) +- [Redis](https://github.com/antirez/redis) -## Run +# Run -### API Server +> API Server ```bash relay --config /path/to/config.yml server ``` -### Job Worker +> Job Worker ```bash relay --config /path/to/config.yml worker ``` -### CLI Management Utility +> CLI Management Utility ```bash relay --config /path/to/config.yml control @@ -42,7 +40,7 @@ relay --config /path/to/config.yml control ## Config -### YAML Format +> YAML Format ```yaml config.yml ACTOR_PEM: /var/lib/relay/actor.pem @@ -58,36 +56,22 @@ JOB_CONCURRENCY: 50 # RELAY_IMAGE: https:// ``` -### Environment Variable +# Environment Variables - This is **Optional** : When `config.yml` not exists, use environment variable. +``` +This is ***Optional*** : When the `config.yml` file does not exist, use environment variables instead. +``` - - ACTOR_PEM - - REDIS_URL - - RELAY_BIND - - RELAY_DOMAIN - - RELAY_SERVICENAME - - JOB_CONCURRENCY - - RELAY_SUMMARY - - RELAY_ICON - - RELAY_IMAGE + - ACTOR_PEM + - REDIS_URL + - RELAY_BIND + - RELAY_DOMAIN + - RELAY_SERVICENAME + - JOB_CONCURRENCY + - RELAY_SUMMARY + - RELAY_ICON + - RELAY_IMAGE -## [Document](https://github.com/yukimochi/Activity-Relay/wiki) +# Documentation -See [GitHub wiki](https://github.com/yukimochi/Activity-Relay/wiki) to build / install / manage relay. - -## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fyukimochi%2FActivity-Relay.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fyukimochi%2FActivity-Relay?ref=badge_large) - -## Project Sponsors - -Thank you for your support. - -### Monthly Donation - -**[My Donator List](https://relay.toot.yukimochi.jp#patreon-list)** - -#### Donation Platform - - [Patreon](https://www.patreon.com/yukimochi) - - [pixiv fanbox](https://yukimochi.fanbox.cc) - - [fantia](https://fantia.jp/fanclubs/11264) +See [GitHub wiki](https://github.com/lilfade/Activity-Relay/wiki) to build / install / manage relay.