diff --git a/cfgldr/config.go b/cfgldr/config.go index 2983ef4..7b2f3ae 100644 --- a/cfgldr/config.go +++ b/cfgldr/config.go @@ -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 { diff --git a/config/config.example.yaml b/config/config.example.yaml index ad75341..2b89cdc 100644 --- a/config/config.example.yaml +++ b/config/config.example.yaml @@ -20,4 +20,3 @@ redis: host: localhost port: 6379 password: "" - dbnum: 0 \ No newline at end of file diff --git a/database/redis.connection.go b/database/redis.connection.go index 6e10cf0..5ca75e7 100644 --- a/database/redis.connection.go +++ b/database/redis.connection.go @@ -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" @@ -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 { diff --git a/docker-compose.yaml b/docker-compose.yaml index 74c9346..d0687b6 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,7 +12,7 @@ services: volumes: - postgres:/var/lib/postgresql/data ports: - - "5433:5432" + - "5432:5432" cache: image: redis restart: unless-stopped