migrate redis to multiple dragonflydb instances
This commit is contained in:
parent
5f897ba69d
commit
5daafdf806
2 changed files with 64 additions and 28 deletions
|
|
@ -14,9 +14,6 @@ services:
|
||||||
api:
|
api:
|
||||||
image: registry.activitypub.software/transfem-org/sharkey:latest
|
image: registry.activitypub.software/transfem-org/sharkey:latest
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
|
||||||
redis:
|
|
||||||
condition: service_healthy
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:60628:3001"
|
- "127.0.0.1:60628:3001"
|
||||||
networks:
|
networks:
|
||||||
|
|
@ -39,9 +36,6 @@ services:
|
||||||
worker:
|
worker:
|
||||||
image: registry.activitypub.software/transfem-org/sharkey:latest
|
image: registry.activitypub.software/transfem-org/sharkey:latest
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
|
||||||
redis:
|
|
||||||
condition: service_healthy
|
|
||||||
networks:
|
networks:
|
||||||
- db
|
- db
|
||||||
- sharkey
|
- sharkey
|
||||||
|
|
@ -60,9 +54,6 @@ services:
|
||||||
activity:
|
activity:
|
||||||
image: registry.activitypub.software/transfem-org/sharkey:latest
|
image: registry.activitypub.software/transfem-org/sharkey:latest
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
|
||||||
redis:
|
|
||||||
condition: service_healthy
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:47815:3002"
|
- "127.0.0.1:47815:3002"
|
||||||
networks:
|
networks:
|
||||||
|
|
@ -86,9 +77,6 @@ services:
|
||||||
media:
|
media:
|
||||||
image: registry.activitypub.software/transfem-org/sharkey:latest
|
image: registry.activitypub.software/transfem-org/sharkey:latest
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
|
||||||
redis:
|
|
||||||
condition: service_healthy
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:57378:3003"
|
- "127.0.0.1:57378:3003"
|
||||||
networks:
|
networks:
|
||||||
|
|
@ -108,18 +96,66 @@ services:
|
||||||
- ./media:/sharkey/.config
|
- ./media:/sharkey/.config
|
||||||
- ./default.yml:/sharkey/.config/default.yml:ro
|
- ./default.yml:/sharkey/.config/default.yml:ro
|
||||||
|
|
||||||
# redis is used for caching
|
# "redis is for caching" WRONG!!! it is long term persistent storage in misskey. for some reason. "caching".
|
||||||
redis:
|
# 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:
|
||||||
|
image: docker.dragonflydb.io/dragonflydb/dragonfly
|
||||||
restart: always
|
restart: always
|
||||||
image: redis:alpine
|
ulimits:
|
||||||
volumes:
|
memlock: -1
|
||||||
- ./redis:/data
|
|
||||||
networks:
|
networks:
|
||||||
- sharkey
|
- sharkey
|
||||||
healthcheck:
|
environment:
|
||||||
test: "redis-cli ping"
|
# these envvars are important in order for dragonflydb/misskey to interact with each other properly, and to load and save all data properly
|
||||||
interval: 5s
|
DFLY_snapshot_cron: '* * * * *'
|
||||||
retries: 20
|
DFLY_version_check: false
|
||||||
|
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/general:/data
|
||||||
|
|
||||||
|
# job queue dfdb
|
||||||
|
dragonfly-queue:
|
||||||
|
image: docker.dragonflydb.io/dragonflydb/dragonfly
|
||||||
|
restart: always
|
||||||
|
ulimits:
|
||||||
|
memlock: -1
|
||||||
|
networks:
|
||||||
|
- sharkey
|
||||||
|
environment:
|
||||||
|
DFLY_port: 6380
|
||||||
|
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/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
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
db:
|
db:
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ dbReplications: false
|
||||||
#───┘ Redis configuration └─────────────────────────────────────
|
#───┘ Redis configuration └─────────────────────────────────────
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
host: redis
|
host: dragonfly
|
||||||
port: 6379
|
port: 6379
|
||||||
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
||||||
#pass: example-pass
|
#pass: example-pass
|
||||||
|
|
@ -160,9 +160,9 @@ redis:
|
||||||
# # You can specify more ioredis options...
|
# # You can specify more ioredis options...
|
||||||
# #username: example-username
|
# #username: example-username
|
||||||
|
|
||||||
#redisForJobQueue:
|
redisForJobQueue:
|
||||||
# host: redis
|
host: dragonfly-queue
|
||||||
# port: 6379
|
port: 6380
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
||||||
# #pass: example-pass
|
# #pass: example-pass
|
||||||
# #prefix: example-prefix
|
# #prefix: example-prefix
|
||||||
|
|
@ -170,9 +170,9 @@ redis:
|
||||||
# # You can specify more ioredis options...
|
# # You can specify more ioredis options...
|
||||||
# #username: example-username
|
# #username: example-username
|
||||||
|
|
||||||
#redisForTimelines:
|
redisForTimelines:
|
||||||
# host: redis
|
host: dragonfly-tl
|
||||||
# port: 6379
|
port: 6381
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
||||||
# #pass: example-pass
|
# #pass: example-pass
|
||||||
# #prefix: example-prefix
|
# #prefix: example-prefix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue