From 32d1e324cc4d56d05a3c40313e21f651f4581002 Mon Sep 17 00:00:00 2001 From: Ruben Date: Wed, 8 Oct 2025 23:33:45 -0500 Subject: [PATCH] multiple dragonflydb instances just creates more overhead, actually --- phosphorus/srv/docker/sharkey/compose.yaml | 46 ++++++---------------- phosphorus/srv/docker/sharkey/default.yml | 14 +++---- 2 files changed, 19 insertions(+), 41 deletions(-) diff --git a/phosphorus/srv/docker/sharkey/compose.yaml b/phosphorus/srv/docker/sharkey/compose.yaml index 62b1c17..510b12c 100644 --- a/phosphorus/srv/docker/sharkey/compose.yaml +++ b/phosphorus/srv/docker/sharkey/compose.yaml @@ -96,12 +96,8 @@ services: - ./media:/sharkey/.config - ./default.yml:/sharkey/.config/default.yml:ro - # "redis is for caching" WRONG!!! it is long term persistent storage in misskey. for some reason. "caching". - # do NOT wipe redis or you lose a bunch of actual data like timelines and notifications. - # also, we use dragonflydb over redis. personal preference, better performance and stability. - - # general dfdb - dragonfly: + # dragonflydb (redis), as is required by misskey for a good amount of data + dragonflydb: image: docker.dragonflydb.io/dragonflydb/dragonfly restart: always ulimits: @@ -117,10 +113,10 @@ services: DFLY_df_snapshot_format: false # misskey doesn't know how to handle dfdb's format DFLY_dir: '/data' # directory with the snapshot/data volumes: - - ./dragonfly/general:/data + - ./dfdb:/data - # job queue dfdb - dragonfly-queue: + # dragonflydb, for caching and required by *key for storing important data + dfdb: image: docker.dragonflydb.io/dragonflydb/dragonfly restart: always ulimits: @@ -128,34 +124,16 @@ services: networks: - sharkey environment: - DFLY_port: 6380 + # these envvars are important in order for dragonflydb/misskey to interact with each other properly, and to load and save all data properly DFLY_snapshot_cron: '* * * * *' DFLY_version_check: false - DFLY_default_lua_flags: allow-undeclared-keys - DFLY_dbfilename: 'dump.rdb' - DFLY_df_snapshot_format: false - DFLY_dir: '/data' + DFLY_default_lua_flags: allow-undeclared-keys # without this, dfdb would immediately complain loading data + DFLY_dbfilename: 'dump.rdb' # misskey expects this + DFLY_df_snapshot_format: false # misskey doesn't know how to handle dfdb's format + DFLY_dir: '/data' # directory with the snapshot/data volumes: - - ./dragonfly/queue:/data - - # timelines dfdb - dragonfly-tl: - image: docker.dragonflydb.io/dragonflydb/dragonfly - restart: always - ulimits: - memlock: -1 - networks: - - sharkey - environment: - DFLY_port: 6381 - DFLY_snapshot_cron: '* * * * *' - DFLY_version_check: false - DFLY_default_lua_flags: allow-undeclared-keys - DFLY_dbfilename: 'dump.rdb' - DFLY_df_snapshot_format: false - DFLY_dir: '/data' - volumes: - - ./dragonfly/timelines:/data + #- ./dragonfly/general:/data + - ./dfdb:/data networks: db: diff --git a/phosphorus/srv/docker/sharkey/default.yml b/phosphorus/srv/docker/sharkey/default.yml index dc6a225..2c48a29 100644 --- a/phosphorus/srv/docker/sharkey/default.yml +++ b/phosphorus/srv/docker/sharkey/default.yml @@ -141,7 +141,7 @@ dbReplications: false #───┘ Redis configuration └───────────────────────────────────── redis: - host: dragonfly + host: dfdb port: 6379 #family: 0 # 0=Both, 4=IPv4, 6=IPv6 #pass: example-pass @@ -160,9 +160,9 @@ redis: # # You can specify more ioredis options... # #username: example-username -redisForJobQueue: - host: dragonfly-queue - port: 6380 +#redisForJobQueue: +# host: dragonfly-queue +# port: 6380 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #pass: example-pass # #prefix: example-prefix @@ -170,9 +170,9 @@ redisForJobQueue: # # You can specify more ioredis options... # #username: example-username -redisForTimelines: - host: dragonfly-tl - port: 6381 +#redisForTimelines: +# host: dragonfly-tl +# port: 6381 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #pass: example-pass # #prefix: example-prefix