fix: fix dockerfile build

This commit is contained in:
Bluub
2022-02-14 13:43:35 +01:00
parent 0e1bfda9f0
commit 10c4c0be4d
7 changed files with 83 additions and 29 deletions
+13
View File
@@ -30,6 +30,7 @@ library
Api.Pipeline
App
Config
Core.OIDC
Core.Pipeline
Core.Reaction
Core.User
@@ -57,9 +58,12 @@ library
, hasql-migration
, hasql-pool
, hasql-transaction
, http-conduit
, http-media
, memory
, mr-env
, network
, opaleye >=0.9.0.0 && <0.9.2.0
, rel8
, servant
, servant-auth
@@ -68,6 +72,7 @@ library
, text
, time
, transformers
, unordered-containers
, utf8-string
, wai
, warp
@@ -90,9 +95,12 @@ executable aeris-exe
, hasql-migration
, hasql-pool
, hasql-transaction
, http-conduit
, http-media
, memory
, mr-env
, network
, opaleye >=0.9.0.0 && <0.9.2.0
, rel8
, servant
, servant-auth
@@ -101,6 +109,7 @@ executable aeris-exe
, text
, time
, transformers
, unordered-containers
, utf8-string
, wai
, warp
@@ -127,9 +136,12 @@ test-suite aeris-test
, hspec
, hspec-wai
, hspec-wai-json
, http-conduit
, http-media
, memory
, mr-env
, network
, opaleye >=0.9.0.0 && <0.9.2.0
, rel8
, servant
, servant-auth
@@ -138,6 +150,7 @@ test-suite aeris-test
, text
, time
, transformers
, unordered-containers
, utf8-string
, wai
, warp
+4
View File
@@ -20,6 +20,7 @@ description: Please see the README on GitHub at <https://github.com/gith
dependencies:
- base >= 4.7 && < 5
- opaleye >= 0.9.0.0 && < 0.9.2.0
- aeson
- servant
- servant-server
@@ -40,6 +41,9 @@ dependencies:
- memory
- transformers
- mr-env
- unordered-containers
- http-media
- http-conduit
- utf8-string
library:
+19
View File
@@ -0,0 +1,19 @@
{-# LANGUAGE OverloadedStrings #-}
module Core.OIDC where
import Data.ByteString.Lazy
-- * OIDC
data OIDCConf =
OIDCConf { redirectUri :: ByteString
, clientId :: ByteString
, clientPassword :: ByteString
} deriving (Show, Eq)
oidcGoogleConf :: OIDCConf
oidcGoogleConf = OIDCConf
{ redirectUri = "http://localhost:8080/auth/login/google"
, clientId = "914790981890-qjn5qjq5qjqjqjqjqjqjqjqjqjqjqjq.apps.googleusercontent.com"
, clientPassword = "914790981890-qjn5qjq5qjqjqjqjqjqjqjqjqjqjqjqjq"
}
+2 -2
View File
@@ -40,15 +40,15 @@ packages:
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
#
extra-deps:
- rel8-1.1.0.0@sha256:c31ad1bfbd7446ccbe39075d66dc89c8de3b3788c144247c9de269cfc55e1428,5023
- git: https://github.com/haskell-servant/servant.git
commit: 22d5790e73f6b74401ac2cec32a627edc77a34d8
subdirs:
- servant
- servant-server
- rel8-1.3.0.0@sha256:f9f5f74b7a0d68f1dfc31ddf482d4ebfc6cac638dfe30bea07378cb384cbf52c,5114
- hasql-migration-0.3.0@sha256:6ca4cc6c89834bb79eb9f15b504774043b5b3994336bd86a9d79e59da6d54963,2799
- mr-env-0.1.0.4@sha256:56439c7df09a83b72b170f104723293643ad2635df03cdcd174a05d0d73e788d,1055
- opaleye-0.9.0.0@sha256:2e96ce59ea10f0b5f41cb4bccc67e0d18fef9dad6ebeef9cee33541564ac0be0,5837
# Override default flag values for local packages and extra-deps
# flags: {}
+14 -7
View File
@@ -4,13 +4,6 @@
# https://docs.haskellstack.org/en/stable/lock_files
packages:
- completed:
hackage: rel8-1.1.0.0@sha256:c31ad1bfbd7446ccbe39075d66dc89c8de3b3788c144247c9de269cfc55e1428,5023
pantry-tree:
sha256: 11aca3bab6462b5997acb4a9969625e839d5369ff1c7cb687db86a729d5b4c00
size: 9096
original:
hackage: rel8-1.1.0.0@sha256:c31ad1bfbd7446ccbe39075d66dc89c8de3b3788c144247c9de269cfc55e1428,5023
- completed:
git: https://github.com/haskell-servant/servant.git
name: servant
@@ -37,6 +30,13 @@ packages:
git: https://github.com/haskell-servant/servant.git
subdir: servant-server
commit: 22d5790e73f6b74401ac2cec32a627edc77a34d8
- completed:
hackage: rel8-1.3.0.0@sha256:f9f5f74b7a0d68f1dfc31ddf482d4ebfc6cac638dfe30bea07378cb384cbf52c,5114
pantry-tree:
sha256: 2b151572fb50e63b4e47a2aaaf2a9431aa7719f8cf334babdf53134df77befeb
size: 9161
original:
hackage: rel8-1.3.0.0@sha256:f9f5f74b7a0d68f1dfc31ddf482d4ebfc6cac638dfe30bea07378cb384cbf52c,5114
- completed:
hackage: hasql-migration-0.3.0@sha256:6ca4cc6c89834bb79eb9f15b504774043b5b3994336bd86a9d79e59da6d54963,2799
pantry-tree:
@@ -51,6 +51,13 @@ packages:
size: 376
original:
hackage: mr-env-0.1.0.4@sha256:56439c7df09a83b72b170f104723293643ad2635df03cdcd174a05d0d73e788d,1055
- completed:
hackage: opaleye-0.9.0.0@sha256:2e96ce59ea10f0b5f41cb4bccc67e0d18fef9dad6ebeef9cee33541564ac0be0,5837
pantry-tree:
sha256: 0cd508ef304e75b8a492b214a8865c9b305a7f38a034d8704f5b26b61a9e9fd8
size: 5661
original:
hackage: opaleye-0.9.0.0@sha256:2e96ce59ea10f0b5f41cb4bccc67e0d18fef9dad6ebeef9cee33541564ac0be0,5837
snapshots:
- completed:
sha256: f9970d6f25c63e3e4265aa8e9c69a047ba8919d1107e4996bdd7555b75aad0eb
+20 -20
View File
@@ -1,20 +1,20 @@
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Lib (app)
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
main :: IO ()
main = hspec spec
spec :: Spec
spec = with (return app) $ do
describe "GET /users" $ do
it "responds with 200" $ do
get "/users" `shouldRespondWith` 200
it "responds with [User]" $ do
let users = "[{\"userId\":1,\"userFirstName\":\"Isaac\",\"userLastName\":\"Newton\"},{\"userId\":2,\"userFirstName\":\"Albert\",\"userLastName\":\"Einstein\"}]"
get "/users" `shouldRespondWith` users
-{-# LANGUAGE QuasiQuotes #-}
-{-# LANGUAGE OverloadedStrings #-}
-module Main (main) where
-
-import Lib (app)
-import Test.Hspec
-import Test.Hspec.Wai
-import Test.Hspec.Wai.JSON
-
-main :: IO ()
-main = hspec spec
-
-spec :: Spec
-spec = with (return app) $ do
- describe "GET /users" $ do
- it "responds with 200" $ do
- get "/users" `shouldRespondWith` 200
- it "responds with [User]" $ do
- let users = "[{\"userId\":1,\"userFirstName\":\"Isaac\",\"userLastName\":\"Newton\"},{\"userId\":2,\"userFirstName\":\"Albert\",\"userLastName\":\"Einstein\"}]"
- get "/users" `shouldRespondWith` users
+11
View File
@@ -0,0 +1,11 @@
---
test_name: Signup a user
stages:
- name: Make sure we have the right ID
request:
url: https://localhost:8080/auth/signup
method: POST
response:
status_code: 200