Skip to content

Commit

Permalink
Merge pull request #3 from Varkoff/04-authentication
Browse files Browse the repository at this point in the history
Remove Redis Volume
  • Loading branch information
Varkoff authored Apr 20, 2024
2 parents abad676 + 362aea2 commit da79cd9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ async function bootstrap() {
const redisUrl = process.env.REDIS_URL || "redis://localhost:6379"
const redisClient = new Redis(redisUrl, {

}).on('error', console.error).on('connect', () => {
console.log('Connected to Redis');
});
redisClient.connect().catch(console.error)

// Initialize store
const redisStore = new RedisStore({
Expand All @@ -41,7 +42,7 @@ async function bootstrap() {
cookie: {
maxAge: 1000 * 60 * 60 * 24 * 30, // 30 days
sameSite: "lax",
secure: false
secure: process.env.NODE_ENV === 'production',
}
}),
)
Expand Down
Binary file modified cache/dump.rdb
Binary file not shown.
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
monorepo_dev:
environment:
- REDIS_URL=redis://redis_dev:6379
- NODE_ENV
- NODE_ENV=development
- DATABASE_URL

container_name: nestjs-remix-monorepo-dev
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
# - '6379:6379'
command: ["redis-server"]
# --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
# - ./cache:/data
- /dev/volumes/nestjs-remix/production/sessions/:/data
# volumes:
# # - ./cache:/data
# - /dev/volumes/nestjs-remix/production/sessions/:/data

0 comments on commit da79cd9

Please sign in to comment.