1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-23 14:46:40 +09:00

Use DragonflyDB (MisskeyIO#716)

This commit is contained in:
まっちゃとーにゅ 2024-09-17 03:46:58 +09:00 committed by GitHub
parent 1367c8dde6
commit 454a3f91fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 112 additions and 42 deletions

View File

@ -72,7 +72,7 @@ dbReplications: false
#───┘ Redis configuration └───────────────────────────────────── #───┘ Redis configuration └─────────────────────────────────────
redis: redis:
host: keydb 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
@ -80,7 +80,7 @@ redis:
#db: 1 #db: 1
#redisForPubsub: #redisForPubsub:
# host: keydb # 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
@ -88,7 +88,7 @@ redis:
# #db: 1 # #db: 1
#redisForJobQueue: #redisForJobQueue:
# host: keydb # 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
@ -96,7 +96,7 @@ redis:
# #db: 1 # #db: 1
#redisForTimelines: #redisForTimelines:
# host: keydb # 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

View File

@ -72,7 +72,7 @@ dbReplications: false
#───┘ Redis configuration └───────────────────────────────────── #───┘ Redis configuration └─────────────────────────────────────
redis: redis:
host: keydb 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
@ -80,7 +80,7 @@ redis:
#db: 1 #db: 1
#redisForPubsub: #redisForPubsub:
# host: keydb # 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
@ -88,7 +88,7 @@ redis:
# #db: 1 # #db: 1
#redisForJobQueue: #redisForJobQueue:
# host: keydb # 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
@ -96,7 +96,7 @@ redis:
# #db: 1 # #db: 1
#redisForTimelines: #redisForTimelines:
# host: keydb # 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

View File

@ -15,17 +15,25 @@ services:
- internal_network - internal_network
- external_network - external_network
keydb: dragonfly:
restart: unless-stopped restart: unless-stopped
image: eqalpha/keydb:latest image: docker.dragonflydb.io/dragonflydb/dragonfly
ulimits:
memlock: -1
environment:
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
DFLY_epoll_file_threads: 4
DFLY_proactor_threads: 4
networks: networks:
- internal_network - internal_network
volumes: volumes:
- keydb-data:/data - dragonfly-data:/data
healthcheck:
test: "keydb-cli ping"
interval: 5s
retries: 20
db: db:
restart: unless-stopped restart: unless-stopped
@ -45,7 +53,7 @@ services:
volumes: volumes:
postgres-data: postgres-data:
keydb-data: dragonfly-data:
networks: networks:
internal_network: internal_network:

View File

@ -11,7 +11,6 @@ docker-compose.yml
node_modules/ node_modules/
packages/*/node_modules packages/*/node_modules
redis/ redis/
keydb/
files/ files/
fluent-emojis/ fluent-emojis/
.pnp.* .pnp.*

View File

@ -32,8 +32,18 @@ jobs:
env: env:
POSTGRES_DB: test-misskey POSTGRES_DB: test-misskey
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
keydb: dragonfly:
image: eqalpha/keydb:latest image: docker.dragonflydb.io/dragonflydb/dragonfly
options: --ulimit "memlock=-1"
env:
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
DFLY_epoll_file_threads: 4
DFLY_proactor_threads: 4
ports: ports:
- 56312:6379 - 56312:6379
@ -84,8 +94,18 @@ jobs:
env: env:
POSTGRES_DB: test-misskey POSTGRES_DB: test-misskey
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
keydb: dragonfly:
image: eqalpha/keydb:latest image: docker.dragonflydb.io/dragonflydb/dragonfly
options: --ulimit "memlock=-1"
env:
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
DFLY_epoll_file_threads: 4
DFLY_proactor_threads: 4
ports: ports:
- 56312:6379 - 56312:6379

1
.gitignore vendored
View File

@ -53,7 +53,6 @@ run.bat
api-docs.json api-docs.json
*.log *.log
/redis /redis
/keydb
*.code-workspace *.code-workspace
.DS_Store .DS_Store
/files /files

View File

@ -37,8 +37,25 @@ spec:
value: "misskey" value: "misskey"
ports: ports:
- containerPort: 5432 - containerPort: 5432
- name: keydb - name: dragonfly
image: eqalpha/keydb:latest image: docker.dragonflydb.io/dragonflydb/dragonfly
env:
- name: DFLY_version_check
value: false
- name: DFLY_tcp_backlog
value: 2048
- name: DFLY_default_lua_flags
value: allow-undeclared-keys
- name: DFLY_pipeline_squash
value: 0
- name: DFLY_multi_exec_squash
value: false
- name: DFLY_conn_io_threads
value: 4
- name: DFLY_epoll_file_threads
value: 4
- name: DFLY_proactor_threads
value: 4
ports: ports:
- containerPort: 6379 - containerPort: 6379
volumes: volumes:

View File

@ -3,17 +3,25 @@ version: "3"
# このconfigは、 dockerでMisskey本体を起動せず、 redisとpostgresql などだけを起動します # このconfigは、 dockerでMisskey本体を起動せず、 redisとpostgresql などだけを起動します
services: services:
keydb: dragonfly:
restart: always restart: always
image: eqalpha/keydb:latest image: docker.dragonflydb.io/dragonflydb/dragonfly
ulimits:
memlock: -1
environment:
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
DFLY_epoll_file_threads: 4
DFLY_proactor_threads: 4
ports: ports:
- "6379:6379" - "6379:6379"
volumes: volumes:
- ./keydb:/data - ./redis:/data
healthcheck:
test: "keydb-cli ping"
interval: 5s
retries: 20
db: db:
restart: always restart: always

View File

@ -6,13 +6,13 @@ services:
restart: always restart: always
links: links:
- db - db
- keydb - dragonfly
# - mcaptcha # - mcaptcha
# - meilisearch # - meilisearch
depends_on: depends_on:
db: db:
condition: service_healthy condition: service_healthy
keydb: dragonfly:
condition: service_healthy condition: service_healthy
ports: ports:
- "3000:3000" - "3000:3000"
@ -23,17 +23,25 @@ services:
- ./files:/misskey/files - ./files:/misskey/files
- ./.config:/misskey/.config:ro - ./.config:/misskey/.config:ro
keydb: dragonfly:
restart: always restart: always
image: eqalpha/keydb:latest image: docker.dragonflydb.io/dragonflydb/dragonfly
ulimits:
memlock: -1
environment:
DFLY_snapshot_cron: '* * * * *'
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
DFLY_epoll_file_threads: 4
DFLY_proactor_threads: 4
networks: networks:
- internal_network - internal_network
volumes: volumes:
- ./keydb:/data - ./redis:/data
healthcheck:
test: "keydb-cli ping"
interval: 5s
retries: 20
db: db:
restart: always restart: always

View File

@ -1,8 +1,19 @@
version: "3" version: "3"
services: services:
keydbtest: dragonflytest:
image: eqalpha/keydb:latest image: docker.dragonflydb.io/dragonflydb/dragonfly
ulimits:
memlock: -1
environment:
DFLY_version_check: false
DFLY_tcp_backlog: 2048
DFLY_default_lua_flags: allow-undeclared-keys
DFLY_pipeline_squash: 0
DFLY_multi_exec_squash: false
DFLY_conn_io_threads: 4
DFLY_epoll_file_threads: 4
DFLY_proactor_threads: 4
ports: ports:
- "127.0.0.1:56312:6379" - "127.0.0.1:56312:6379"