Skip to content

Commit

Permalink
Merge pull request #8 from Innovix-Matrix-Systems/IMS-20
Browse files Browse the repository at this point in the history
Redis integration and cache support
  • Loading branch information
AHS12 authored Oct 26, 2024
2 parents 227433f + 4be0c66 commit c4ac7e8
Show file tree
Hide file tree
Showing 23 changed files with 1,070 additions and 72 deletions.
11 changes: 11 additions & 0 deletions .env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ DB_NAME=ims-nest
DB_USERNAME=postgres
DB_PASSWORD=postgres

# Redis Config
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_USERNAME=
REDIS_DB=0
REDIS_MAX_RETRIES=3
REDIS_RETRY_DELAY=50
REDIS_RETRY_DELAY_MAX=2000
REDIS_CONNECT_TIMEOUT=10000


# SMTP Config
SMTP_HOST=smtp.mailtrap.io
Expand Down
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ DB_PASSWORD=
DB_POOL_MIN=2
DB_POOL_MAX=10

# Redis Config
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_USERNAME=
REDIS_DB=0
REDIS_MAX_RETRIES=3
REDIS_RETRY_DELAY=50
REDIS_RETRY_DELAY_MAX=2000
REDIS_CONNECT_TIMEOUT=10000

# SMTP Config
SMTP_HOST=smtp.mailtrap.io
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run test
npm run test:cov
13 changes: 12 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ services:
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
redis:
image: redis:7-alpine
container_name: ims-nest-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes # For data persistence
restart: unless-stopped


volumes:
postgres_data:
postgres_data:
redis_data:
Loading

0 comments on commit c4ac7e8

Please sign in to comment.