Commit 94448a93 authored by Jürgen Enge's avatar Jürgen Enge
Browse files

log of dsn

parent d8f55e0e
......@@ -26,6 +26,10 @@ MariaDB/MySQL Server with table structure of [table.sql](tables.sql)
http://localhost:83/[audience]/[subject]
https://media.memobase.k8s.unibas.ch/command/clearcache?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbWQ6Y2xlYXJjYWNoZSJ9.sZoTANdvTdoc1Kji_0_GxpgNWEU82G5b6Wkm8dfJgKs
sub: cmd:clearcache
### Docker
```sh
......
......@@ -4,6 +4,7 @@ import (
"github.com/BurntSushi/toml"
"gitlab.switch.ch/memoriav/memobase-2020/services/streaming-server/pkg/memostream"
"log"
"os"
"time"
)
......@@ -69,5 +70,13 @@ func LoadConfig(filepath string) Config {
if err != nil {
log.Fatalln("Error on loading config: ", err)
}
dsn := os.Getenv("DSN")
if dsn != "" {
conf.ResolverDBMySQL.Dsn = dsn
log.Printf("DSN from Environment: %s", dsn)
} else {
log.Printf("DSN from Config: %s", dsn)
}
return conf
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment