From 2b985757c7ae7eaadb7630abdfd2c8158d7d9e6c Mon Sep 17 00:00:00 2001 From: Ruben Date: Fri, 9 Jan 2026 21:17:26 -0600 Subject: [PATCH] edit sharkey-dfdb, add sharkey configs --- beeper/etc/caddy/sites-enabled/sharkey | 38 +++++++++++++++++++ .../systemd/sharkey/sharkey-dfdb.container | 5 ++- .../sharkey/activity/sharkey-activity.yml | 12 ++++++ .../containers/sharkey/api/sharkey-api.yml | 12 ++++++ .../sharkey/media/sharkey-media.yml | 12 ++++++ .../sharkey/worker/sharkey-worker.yml | 18 +++++++++ 6 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 beeper/etc/caddy/sites-enabled/sharkey create mode 100644 beeper/var/containers/sharkey/activity/sharkey-activity.yml create mode 100644 beeper/var/containers/sharkey/api/sharkey-api.yml create mode 100644 beeper/var/containers/sharkey/media/sharkey-media.yml create mode 100644 beeper/var/containers/sharkey/worker/sharkey-worker.yml diff --git a/beeper/etc/caddy/sites-enabled/sharkey b/beeper/etc/caddy/sites-enabled/sharkey new file mode 100644 index 0000000..ce362ec --- /dev/null +++ b/beeper/etc/caddy/sites-enabled/sharkey @@ -0,0 +1,38 @@ +*.sharkeyeyeyeyey.beeper.synth.download { + handle /.well-known/atproto-did { + rewrite * /.well-known/atproto-did?protocol=ap&id=%40{http.request.host.labels.3}%40booping.synth.download + + reverse_proxy https://fed.brid.gy { + header_up Host fed.brid.gy + } + } +} + +sharkeyeyeyeyey.beeper.synth.download { + @activity_pub `header({'Content-Type': 'application/activity+json*'}) || header({'Content-Type': 'application/ld+json*'}) || header({'Accept': 'application/activity+json*'}) || header({'Accept': 'application/ld+json*'})` + + route { + # activitypub service + reverse_proxy @activity_pub http://127.0.0.1:47815 + reverse_proxy /api/admin/federation/refresh-remote-instance-metadata http://127.0.0.1:47815 + reverse_proxy /api/notes/polls/refresh http://127.0.0.1:47815 + reverse_proxy /api/federation/update-remote-user http://127.0.0.1:47815 + reverse_proxy /api/ap/get http://127.0.0.1:47815 + reverse_proxy /api/ap/show http://127.0.0.1:47815 + + # media service + reverse_proxy /files/* http://127.0.0.1:57378 + reverse_proxy /emoji/* http://127.0.0.1:57378 + reverse_proxy /avatar/* http://127.0.0.1:57378 + reverse_proxy /url http://127.0.0.1:57378 + reverse_proxy /twemoji-badge/* http://127.0.0.1:57378 + reverse_proxy /identicon/* http://127.0.0.1:57378 + + # api + web frontend (+ general fallback) + reverse_proxy http://127.0.0.1:60628 + } + + import common-settings + import log sharkey + import robots-txt +} \ No newline at end of file diff --git a/beeper/etc/containers/systemd/sharkey/sharkey-dfdb.container b/beeper/etc/containers/systemd/sharkey/sharkey-dfdb.container index 382fa48..b58ef87 100644 --- a/beeper/etc/containers/systemd/sharkey/sharkey-dfdb.container +++ b/beeper/etc/containers/systemd/sharkey/sharkey-dfdb.container @@ -2,6 +2,7 @@ Description=Sharkey's DragonflyDB process [Container] +Image=docker.dragonflydb.io/dragonflydb/dragonfly ContainerName=sharkey-dfdb Environment=DFLY_snapshot_cron="* * * * *" Environment=DFLY_version_check=false @@ -9,7 +10,9 @@ Environment=DFLY_default_lua_flags=allow-undeclared-keys Environment=DFLY_dbfilename=dump.rdb Environment=DFLY_df_snapshot_format=false Environment=DFLY_dir=/data -Image=docker.dragonflydb.io/dragonflydb/dragonfly +HealthCmd=redis-cli ping +HealthInterval=5s +HealthRetries=20 Network=sharkey.network Volume=/var/containers/sharkey/dfdb:/data:z diff --git a/beeper/var/containers/sharkey/activity/sharkey-activity.yml b/beeper/var/containers/sharkey/activity/sharkey-activity.yml new file mode 100644 index 0000000..1897b68 --- /dev/null +++ b/beeper/var/containers/sharkey/activity/sharkey-activity.yml @@ -0,0 +1,12 @@ +# The port that your Misskey server should listen on. +port: 3002 + +# Job concurrency per worker +deliverJobConcurrency: 0 +inboxJobConcurrency: 0 +relationshipJobConcurrency: 0 + +# Job rate limiter +deliverJobPerSec: 0 +inboxJobPerSec: 0 +relationshipJobPerSec: 0 \ No newline at end of file diff --git a/beeper/var/containers/sharkey/api/sharkey-api.yml b/beeper/var/containers/sharkey/api/sharkey-api.yml new file mode 100644 index 0000000..5eb8f0e --- /dev/null +++ b/beeper/var/containers/sharkey/api/sharkey-api.yml @@ -0,0 +1,12 @@ +# The port that your Misskey server should listen on. +port: 3001 + +# Job concurrency per worker +deliverJobConcurrency: 0 +inboxJobConcurrency: 0 +relationshipJobConcurrency: 0 + +# Job rate limiter +deliverJobPerSec: 0 +inboxJobPerSec: 0 +relationshipJobPerSec: 0 \ No newline at end of file diff --git a/beeper/var/containers/sharkey/media/sharkey-media.yml b/beeper/var/containers/sharkey/media/sharkey-media.yml new file mode 100644 index 0000000..184ef83 --- /dev/null +++ b/beeper/var/containers/sharkey/media/sharkey-media.yml @@ -0,0 +1,12 @@ +# The port that your Misskey server should listen on. +port: 3003 + +# Job concurrency per worker +deliverJobConcurrency: 0 +inboxJobConcurrency: 0 +relationshipJobConcurrency: 0 + +# Job rate limiter +deliverJobPerSec: 0 +inboxJobPerSec: 0 +relationshipJobPerSec: 0 \ No newline at end of file diff --git a/beeper/var/containers/sharkey/worker/sharkey-worker.yml b/beeper/var/containers/sharkey/worker/sharkey-worker.yml new file mode 100644 index 0000000..1ec2618 --- /dev/null +++ b/beeper/var/containers/sharkey/worker/sharkey-worker.yml @@ -0,0 +1,18 @@ +# Number of worker processes +clusterLimit: 2 + +# Job concurrency per worker +# What's relationshipJob?: +# Follow, unfollow, block and unblock(ings) while following-imports, etc. or account migrations. +deliverJobConcurrency: 128 +inboxJobConcurrency: 8 +relationshipJobConcurrency: 32 + +# Job rate limiter +deliverJobPerSec: 4096 +inboxJobPerSec: 4096 +relationshipJobPerSec: 4096 + +# Job attempts +#deliverJobMaxAttempts: 12 +#inboxJobMaxAttempts: 8 \ No newline at end of file