Skip to content

Commit

Permalink
refactor/redis-auth (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
BEdev24 authored Sep 11, 2024
1 parent 7347e4b commit 69fc617
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion backend/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ JWT_REFRESH_TOKEN_EXPIRES_IN=7d
# Redis
REDIS_HOST=cache
REDIS_PORT=6379
REDIS_USERNAME=redis
REDIS_PASSWORD=password

# AWS SES
Expand Down
1 change: 0 additions & 1 deletion backend/src/redis/client/redis-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const redisClientFactory: FactoryProvider<Redis> = {
const redisInstance = new Redis({
host: configService.getOrThrow('REDIS_HOST'),
port: configService.getOrThrow('REDIS_PORT'),
username: configService.getOrThrow('REDIS_USERNAME'),
password: configService.getOrThrow('REDIS_PASSWORD'),
});

Expand Down
8 changes: 2 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,8 @@ services:
container_name: cache
restart: always
environment:
- REDIS_USERNAME=${REDIS_USERNAME}
- REDIS_PASSWORD=${REDIS_PASSWORD}
command: >
redis-server --requirepass ${REDIS_PASSWORD}
--user ${REDIS_USERNAME} on >${REDIS_PASSWORD} ~* +@all
--user default off
- REDIS_PASSWORD=your-redis-password
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- "6379:6379"
volumes:
Expand Down
1 change: 0 additions & 1 deletion example.env
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
REDIS_USERNAME=redis
REDIS_PASSWORD=password
1 change: 0 additions & 1 deletion ipfs-service/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ IPNS_CONSTITUTION_KEY_NAME='some-key-name'
# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_USERNAME=redis
REDIS_PASSWORD=password

## DHT QUEUE ##
Expand Down
1 change: 0 additions & 1 deletion ipfs-service/src/bullmq/bullmq.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ExpressAdapter } from "@bull-board/express";
connection: {
host: configService.getOrThrow("REDIS_HOST"),
port: configService.getOrThrow("REDIS_PORT"),
username: configService.getOrThrow("REDIS_USERNAME"),
password: configService.getOrThrow("REDIS_PASSWORD"),
},
}),
Expand Down
1 change: 0 additions & 1 deletion worker-service/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ DB_SYNC_POSTGRES_PASSWORD=password
# Redis
REDIS_HOST=cache
REDIS_PORT=6379
REDIS_USERNAME=redis
REDIS_PASSWORD=password

# PAGINATION
Expand Down
1 change: 0 additions & 1 deletion worker-service/src/bullmq/bullmq.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { ExpressAdapter } from '@bull-board/express';
connection: {
host: configService.getOrThrow('REDIS_HOST'),
port: configService.getOrThrow('REDIS_PORT'),
username: configService.getOrThrow('REDIS_USERNAME'),
password: configService.getOrThrow('REDIS_PASSWORD'),
},
}),
Expand Down

0 comments on commit 69fc617

Please sign in to comment.