Commit 962fc3d8 authored by Liza Shulyayeva's avatar Liza Shulyayeva

Set up test auth config

parent 47692cc4
Pipeline #70864111 passed with stages
in 19 minutes and 1 second
......@@ -2,7 +2,7 @@
"DBtype": "mysql",
"DBuser": "root",
"DBpass": "root",
"DBHost": "172.18.0.3",
"DBHost": "db",
"DBPort": "3306",
"DBName": "snaillifego"
}
\ No newline at end of file
......@@ -127,7 +127,8 @@ func configure(c *env.Configuration, confdir string) (err error) {
fmt.Printf("\nEnv name: %s\n", envname)
configPath := confdir + "/" + envname
viper.AddConfigPath(configPath)
cwd, _ := os.Getwd()
viper.AddConfigPath(cwd)
// db
dbc, err := configureDB()
c.DBconfig = dbc
......
......@@ -5,6 +5,22 @@ echo getting goose status...
goose mysql "root:root@tcp(db:3306)/snaillifego?parseTime=true" status
echo running migrations...
goose mysql "root:root@tcp(db:3306)/snaillifego?parseTime=true" up
echo "Setting up auth config"
AUTH="{
\"Providers\": [
{
\"Name\": \"MySql\",
\"Properties\": {
\"database\": \"snaillifego\",
\"table_name\": \"users\",
\"session_length\": \"3600\"
}
}]
}"
echo $AUTH >> ../server/config/dev/auth.json
echo starting server...
if [ -n "$SNAILLIFESLV_ARGS" ]; then
echo found args to pass to snaillifesrv
......
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