mirror of
https://github.com/snoyberg/keter.git
synced 2024-12-14 17:12:46 +03:00
Add support for forward-env in BackgroundConfig
This commit is contained in:
parent
46f5eaad89
commit
54bf1d3845
@ -409,6 +409,7 @@ data BackgroundConfig = BackgroundConfig
|
|||||||
, bgconfigEnvironment :: !(Map Text Text)
|
, bgconfigEnvironment :: !(Map Text Text)
|
||||||
, bgconfigRestartCount :: !RestartCount
|
, bgconfigRestartCount :: !RestartCount
|
||||||
, bgconfigRestartDelaySeconds :: !Word
|
, bgconfigRestartDelaySeconds :: !Word
|
||||||
|
, bgconfigForwardEnv :: !(Set Text)
|
||||||
}
|
}
|
||||||
deriving Show
|
deriving Show
|
||||||
|
|
||||||
@ -426,6 +427,7 @@ instance ParseYamlFile BackgroundConfig where
|
|||||||
<*> o .:? "env" .!= Map.empty
|
<*> o .:? "env" .!= Map.empty
|
||||||
<*> o .:? "restart-count" .!= UnlimitedRestarts
|
<*> o .:? "restart-count" .!= UnlimitedRestarts
|
||||||
<*> o .:? "restart-delay-seconds" .!= 5
|
<*> o .:? "restart-delay-seconds" .!= 5
|
||||||
|
<*> o .:? "forward-env" .!= Set.empty
|
||||||
|
|
||||||
instance ToJSON BackgroundConfig where
|
instance ToJSON BackgroundConfig where
|
||||||
toJSON BackgroundConfig {..} = object $ catMaybes
|
toJSON BackgroundConfig {..} = object $ catMaybes
|
||||||
@ -436,4 +438,5 @@ instance ToJSON BackgroundConfig where
|
|||||||
UnlimitedRestarts -> Nothing
|
UnlimitedRestarts -> Nothing
|
||||||
LimitedRestarts count -> Just $ "restart-count" .= count
|
LimitedRestarts count -> Just $ "restart-count" .= count
|
||||||
, Just $ "restart-delay-seconds" .= bgconfigRestartDelaySeconds
|
, Just $ "restart-delay-seconds" .= bgconfigRestartDelaySeconds
|
||||||
|
, Just $ "forward-env" .= bgconfigForwardEnv
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user