Skip to content

Commit

Permalink
テストなどにKeyDBを使うように
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid committed Oct 29, 2023
1 parent 42bc281 commit 7972388
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .config/docker_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,23 @@ dbReplications: false
#───┘ Redis configuration └─────────────────────────────────────

redis:
host: redis
host: keydb
port: 6379
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
#pass: example-pass
#prefix: example-prefix
#db: 1

#redisForPubsub:
# host: redis
# host: keydb
# port: 6379
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
# #pass: example-pass
# #prefix: example-prefix
# #db: 1

#redisForJobQueue:
# host: redis
# host: keydb
# port: 6379
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
# #pass: example-pass
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,23 @@ dbReplications: false
#───┘ Redis configuration └─────────────────────────────────────

redis:
host: redis
host: keydb
port: 6379
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
#pass: example-pass
#prefix: example-prefix
#db: 1

#redisForPubsub:
# host: redis
# host: keydb
# port: 6379
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
# #pass: example-pass
# #prefix: example-prefix
# #db: 1

#redisForJobQueue:
# host: redis
# host: keydb
# port: 6379
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
# #pass: example-pass
Expand Down
10 changes: 5 additions & 5 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ services:
- internal_network
- external_network

redis:
keydb:
restart: unless-stopped
image: redis:7-alpine
image: eqalpha/keydb:latest
networks:
- internal_network
volumes:
- redis-data:/data
- keydb-data:/data
healthcheck:
test: "redis-cli ping"
test: "keydb-cli ping"
interval: 5s
retries: 20

Expand All @@ -45,7 +45,7 @@ services:

volumes:
postgres-data:
redis-data:
keydb-data:

networks:
internal_network:
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ docker-compose.yml
node_modules/
packages/*/node_modules
redis/
keydb/
files/
misskey-assets/
fluent-emojis/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
env:
POSTGRES_DB: test-misskey
POSTGRES_HOST_AUTH_METHOD: trust
redis:
image: redis:7
keydb:
image: eqalpha/keydb:latest
ports:
- 56312:6379

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ jobs:
env:
POSTGRES_DB: test-misskey
POSTGRES_HOST_AUTH_METHOD: trust
redis:
image: redis:7
keydb:
image: eqalpha/keydb:latest
ports:
- 56312:6379

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ coverage
!/.config/docker_example.env
docker-compose.yml
!/.devcontainer/docker-compose.yml
!/packages/backend/test/docker-compose.yml

# misskey
/build
Expand All @@ -51,6 +52,7 @@ run.bat
api-docs.json
*.log
/redis
/keydb
*.code-workspace
.DS_Store
/files
Expand Down
4 changes: 2 additions & 2 deletions chart/templates/Deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ spec:
value: "misskey"
ports:
- containerPort: 5432
- name: redis
image: redis:alpine
- name: keydb
image: eqalpha/keydb:latest
ports:
- containerPort: 6379
volumes:
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ services:
restart: always
links:
- db
- redis
- keydb
# - meilisearch
depends_on:
db:
condition: service_healthy
redis:
keydb:
condition: service_healthy
ports:
- "3000:3000"
Expand All @@ -22,15 +22,15 @@ services:
- ./files:/misskey/files
- ./.config:/misskey/.config:ro

redis:
keydb:
restart: always
image: redis:7-alpine
image: eqalpha/keydb:latest
networks:
- internal_network
volumes:
- ./redis:/data
- ./keydb:/data
healthcheck:
test: "redis-cli ping"
test: "keydb-cli ping"
interval: 5s
retries: 20

Expand Down
4 changes: 2 additions & 2 deletions packages/backend/test/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: "3"

services:
redistest:
image: redis:7
keydbtest:
image: eqalpha/keydb:latest
ports:
- "127.0.0.1:56312:6379"

Expand Down

0 comments on commit 7972388

Please sign in to comment.