diff --git a/app/UniWorX.hs b/app/UniWorX.hs index 974fb18..12c6dcd 100644 --- a/app/UniWorX.hs +++ b/app/UniWorX.hs @@ -48,13 +48,13 @@ share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase| testUsers :: [User] -- TODO move to db testUsers = [ User "Fallback User" "foo@bar.com" - , User "Tina Tester" "t@t.tt" + , User "Tina Tester" "tester@campus.lmu.de" , User "Max Muster" "m@m.mm" ] runDB :: ReaderT SqlBackend (NoLoggingT (ResourceT IO)) a -> IO a runDB action = do Just port <- lookupEnv "OAUTH2_DB_PORT" -- >>= \p -> return $ p <|> Just "9444" - Just host <- lookupEnv "PGHOST" + Just host <- lookupEnv "OAUTH2_PGHOST" let connStr = fromString @ConnectionString $ "host=" ++ host ++ " dbname=test_users user=oauth2mock password=0000 port=" ++ port runStderrLoggingT $ withPostgresqlPool connStr 10 $ \pool -> liftIO $ flip runSqlPersistMPool pool action diff --git a/mkDB.sh b/mkDB.sh index 79d4526..855337c 100755 --- a/mkDB.sh +++ b/mkDB.sh @@ -19,8 +19,8 @@ psql -h "${pgSockDir}" -p ${OAUTH2_DB_PORT} -f ./schema.sql postgres printf "Postgres logfile is %s\nPostgres socket directory is %s\n" "${pgLogFile}" "${pgSockDir}" -export PGHOST="${pgSockDir}" -export PGLOG="${pgLogFile}" +export OAUTH2_PGHOST="${pgSockDir}" +export OAUTH2_PGLOG="${pgLogFile}" zsh