Skip to content
Snippets Groups Projects
Commit fb16f27d authored by Leonardo Christino's avatar Leonardo Christino
Browse files

add redis password

parent 75771521
No related branches found
No related tags found
No related merge requests found
Pipeline #126918 failed
...@@ -39,6 +39,7 @@ develop: ...@@ -39,6 +39,7 @@ develop:
$(eval export RABBIT_PORT := 5672) $(eval export RABBIT_PORT := 5672)
$(eval export REDIS_ADDRESS := localhost:6379) $(eval export REDIS_ADDRESS := localhost:6379)
$(eval export REDIS_PASSWORD := DevOnlyPass)
$(eval export JWT_SECRET := 15D262E1FB339FFBD062FFB81C1831B2757FA3F1C02B7432A3E586A447FB7870) $(eval export JWT_SECRET := 15D262E1FB339FFBD062FFB81C1831B2757FA3F1C02B7432A3E586A447FB7870)
......
...@@ -6,7 +6,6 @@ This program has been developed by students from the bachelor Computer Science a ...@@ -6,7 +6,6 @@ This program has been developed by students from the bachelor Computer Science a
package main package main
import ( import (
"fmt"
"os" "os"
"schema-orchestrator/internal/drivers/rpcdriver" "schema-orchestrator/internal/drivers/rpcdriver"
"schema-orchestrator/internal/drivers/webdriver" "schema-orchestrator/internal/drivers/webdriver"
...@@ -47,9 +46,9 @@ func main() { ...@@ -47,9 +46,9 @@ func main() {
// Create keyvaluestore to get the queue with which clients are connected (websockets) // Create keyvaluestore to get the queue with which clients are connected (websockets)
redisService := keyvaluestore.NewDriver() redisService := keyvaluestore.NewDriver()
err = redisService.Connect(os.Getenv("REDIS_ADDRESS")) err = redisService.Connect(os.Getenv("REDIS_ADDRESS"), os.Getenv("REDIS_PASSWORD"))
if err != nil { if err != nil {
log.Panic().Msg(fmt.Sprintf("keyValueStore error: %s", err)) log.Panic().Str("address", os.Getenv("REDIS_ADDRESS")).AnErr("Error", err).Msg("error connecting to redis")
} else { } else {
log.Info().Str("address", os.Getenv("REDIS_ADDRESS")).Msg("successfully connected to redis") log.Info().Str("address", os.Getenv("REDIS_ADDRESS")).Msg("successfully connected to redis")
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment