mirror of
https://github.com/snoyberg/keter.git
synced 2024-12-14 08:05:40 +03:00
ssl option for each app
This commit is contained in:
parent
1e271d81e7
commit
da1b03b1d3
@ -31,6 +31,7 @@ data Config = Config
|
||||
, configArgs :: [Text]
|
||||
, configHost :: String
|
||||
, configPostgres :: Bool
|
||||
, configSsl :: Bool
|
||||
}
|
||||
|
||||
instance FromJSON Config where
|
||||
@ -39,6 +40,7 @@ instance FromJSON Config where
|
||||
<*> o .:? "args" .!= []
|
||||
<*> o .: "host"
|
||||
<*> o .:? "postgres" .!= False
|
||||
<*> o .:? "ssl" .!= False
|
||||
parseJSON _ = fail "Wanted an object"
|
||||
|
||||
data Command = Reload | Terminate
|
||||
@ -103,7 +105,7 @@ start tf portman postgres logger appname bundle removeFromList = do
|
||||
]
|
||||
Nothing -> []
|
||||
let env = ("PORT", show port)
|
||||
: ("APPROOT", "http://" ++ configHost config)
|
||||
: ("APPROOT", (if configSsl then "https://" else "http://") ++ configHost config)
|
||||
: otherEnv
|
||||
run
|
||||
("config" </> configExec config)
|
||||
|
Loading…
Reference in New Issue
Block a user