diff --git a/.config/docker_example.yml b/.config/docker_example.yml index 8c41261f6878..d80516ce2ceb 100644 --- a/.config/docker_example.yml +++ b/.config/docker_example.yml @@ -72,7 +72,7 @@ dbReplications: false #───┘ Redis configuration └───────────────────────────────────── redis: - host: keydb + host: dragonfly port: 6379 #family: 0 # 0=Both, 4=IPv4, 6=IPv6 #pass: example-pass @@ -80,7 +80,7 @@ redis: #db: 1 #redisForPubsub: -# host: keydb +# host: dragonfly # port: 6379 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #pass: example-pass @@ -88,7 +88,7 @@ redis: # #db: 1 #redisForJobQueue: -# host: keydb +# host: dragonfly # port: 6379 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #pass: example-pass @@ -96,7 +96,7 @@ redis: # #db: 1 #redisForTimelines: -# host: keydb +# host: dragonfly # port: 6379 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #pass: example-pass diff --git a/.devcontainer/devcontainer.yml b/.devcontainer/devcontainer.yml index 38dbb0bb69b5..baf1d3381521 100644 --- a/.devcontainer/devcontainer.yml +++ b/.devcontainer/devcontainer.yml @@ -72,7 +72,7 @@ dbReplications: false #───┘ Redis configuration └───────────────────────────────────── redis: - host: keydb + host: dragonfly port: 6379 #family: 0 # 0=Both, 4=IPv4, 6=IPv6 #pass: example-pass @@ -80,7 +80,7 @@ redis: #db: 1 #redisForPubsub: -# host: keydb +# host: dragonfly # port: 6379 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #pass: example-pass @@ -88,7 +88,7 @@ redis: # #db: 1 #redisForJobQueue: -# host: keydb +# host: dragonfly # port: 6379 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #pass: example-pass @@ -96,7 +96,7 @@ redis: # #db: 1 #redisForTimelines: -# host: keydb +# host: dragonfly # port: 6379 # #family: 0 # 0=Both, 4=IPv4, 6=IPv6 # #pass: example-pass diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index ece9e8f113a8..d9f38b8235fc 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -15,17 +15,25 @@ services: - internal_network - external_network - keydb: + dragonfly: 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: - internal_network volumes: - - keydb-data:/data - healthcheck: - test: "keydb-cli ping" - interval: 5s - retries: 20 + - dragonfly-data:/data db: restart: unless-stopped @@ -45,7 +53,7 @@ services: volumes: postgres-data: - keydb-data: + dragonfly-data: networks: internal_network: diff --git a/.dockerignore b/.dockerignore index 78d119f943aa..087e9861e4cd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,7 +11,6 @@ docker-compose.yml node_modules/ packages/*/node_modules redis/ -keydb/ files/ fluent-emojis/ .pnp.* diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index d6a07299b9d5..1326f37f2ae5 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -32,8 +32,18 @@ jobs: env: POSTGRES_DB: test-misskey POSTGRES_HOST_AUTH_METHOD: trust - keydb: - image: eqalpha/keydb:latest + dragonfly: + 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: - 56312:6379 @@ -84,8 +94,18 @@ jobs: env: POSTGRES_DB: test-misskey POSTGRES_HOST_AUTH_METHOD: trust - keydb: - image: eqalpha/keydb:latest + dragonfly: + 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: - 56312:6379 diff --git a/.gitignore b/.gitignore index 644fe56d63c4..c417e986518f 100644 --- a/.gitignore +++ b/.gitignore @@ -53,7 +53,6 @@ run.bat api-docs.json *.log /redis -/keydb *.code-workspace .DS_Store /files diff --git a/chart/templates/Deployment.yml b/chart/templates/Deployment.yml index a6ea8b216060..2d3c89e673b9 100644 --- a/chart/templates/Deployment.yml +++ b/chart/templates/Deployment.yml @@ -37,8 +37,25 @@ spec: value: "misskey" ports: - containerPort: 5432 - - name: keydb - image: eqalpha/keydb:latest + - name: dragonfly + 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: - containerPort: 6379 volumes: diff --git a/docker-compose.local-db.yml b/docker-compose.local-db.yml index f758e03b6428..25793bc4f852 100644 --- a/docker-compose.local-db.yml +++ b/docker-compose.local-db.yml @@ -3,17 +3,25 @@ version: "3" # このconfigは、 dockerでMisskey本体を起動せず、 redisとpostgresql などだけを起動します services: - keydb: + dragonfly: 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: - "6379:6379" volumes: - - ./keydb:/data - healthcheck: - test: "keydb-cli ping" - interval: 5s - retries: 20 + - ./redis:/data db: restart: always diff --git a/docker-compose_example.yml b/docker-compose_example.yml index aad72273057f..379bc3d77f7c 100644 --- a/docker-compose_example.yml +++ b/docker-compose_example.yml @@ -6,13 +6,13 @@ services: restart: always links: - db - - keydb + - dragonfly # - mcaptcha # - meilisearch depends_on: db: condition: service_healthy - keydb: + dragonfly: condition: service_healthy ports: - "3000:3000" @@ -23,17 +23,25 @@ services: - ./files:/misskey/files - ./.config:/misskey/.config:ro - keydb: + dragonfly: 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: - internal_network volumes: - - ./keydb:/data - healthcheck: - test: "keydb-cli ping" - interval: 5s - retries: 20 + - ./redis:/data db: restart: always diff --git a/packages/backend/test/docker-compose.yml b/packages/backend/test/docker-compose.yml index 286a6607a5aa..74659a952ae8 100644 --- a/packages/backend/test/docker-compose.yml +++ b/packages/backend/test/docker-compose.yml @@ -1,8 +1,19 @@ version: "3" services: - keydbtest: - image: eqalpha/keydb:latest + dragonflytest: + 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: - "127.0.0.1:56312:6379"