Commit 1e8681cd authored by Alexandre Delanoë's avatar Alexandre Delanoë

[CONFIG] data filepath

parent 9eadc63a
Pipeline #999 canceled with stage
......@@ -11,6 +11,9 @@ FRAME_CALC_URL = URL_TO_CHANGE
FRAME_SEARX_URL = URL_TO_CHANGE
FRAME_ISTEX_URL = URL_TO_CHANGE
# Data path to local files
DATA_FILEPATH = FILEPATH_TO_CHANGE
[network]
# Emails From address (sent by smtp)
MAIL = username@gargantext.org
......
......@@ -24,6 +24,7 @@ import Control.Lens (makeLenses)
data GargConfig = GargConfig { _gc_masteruser :: !Text
, _gc_secretkey :: !Text
, _gc_datafilepath :: !Text
, _gc_frame_write_url :: !Text
, _gc_frame_calc_url :: !Text
......@@ -31,7 +32,7 @@ data GargConfig = GargConfig { _gc_masteruser :: !Text
, _gc_frame_searx_url :: !Text
, _gc_frame_istex_url :: !Text
}
deriving (Generic)
deriving (Generic, Show)
makeLenses ''GargConfig
......@@ -49,6 +50,7 @@ readConfig fp = do
pure $ GargConfig (val "MASTER_USER")
(val "SECRET_KEY")
(val "DATA_FILEPATH")
(val "FRAME_WRITE_URL")
(val "FRAME_CALC_URL")
(val "FRAME_SEARX_URL")
......@@ -57,6 +59,7 @@ readConfig fp = do
defaultConfig :: GargConfig
defaultConfig = GargConfig "gargantua"
"secret"
"data/"
"https://frame_write.url"
"https://frame_calc.url"
"https://frame_searx.url"
......
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