Skip to content

Commit

Permalink
Merge pull request #18 from isd-sgcu/fix/redis
Browse files Browse the repository at this point in the history
Fix/redis
  • Loading branch information
bookpanda authored Jan 12, 2024
2 parents 92f56f8 + 92f6f58 commit e400200
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion cfgldr/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ type Redis struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Password string `mapstructure:"password"`
Dbnum int `mapstructure:"dbnum"`
}

type Config struct {
Expand Down
1 change: 0 additions & 1 deletion config/config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ redis:
host: localhost
port: 6379
password: ""
dbnum: 0
2 changes: 1 addition & 1 deletion database/redis.connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package database

import (
"fmt"

"github.com/isd-sgcu/johnjud-auth/cfgldr"
"github.com/pkg/errors"
"github.com/redis/go-redis/v9"
Expand All @@ -13,7 +14,6 @@ func InitRedisConnection(conf *cfgldr.Redis) (*redis.Client, error) {
cache := redis.NewClient(&redis.Options{
Addr: addr,
Password: conf.Password,
DB: conf.Dbnum,
})

if cache == nil {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
volumes:
- postgres:/var/lib/postgresql/data
ports:
- "5433:5432"
- "5432:5432"
cache:
image: redis
restart: unless-stopped
Expand Down

0 comments on commit e400200

Please sign in to comment.