keter 1.3.5.3 → 1.3.6
raw patch · 6 files changed
+12/−4 lines, 6 files
Files
- Keter/App.hs +3/−0
- Keter/Proxy.hs +2/−2
- Keter/Types/V04.hs +0/−1
- Keter/Types/V10.hs +4/−0
- changelog.md +2/−0
- keter.cabal +1/−1
Keter/App.hs view
@@ -44,6 +44,7 @@ import Keter.Types import qualified Network import Prelude hiding (FilePath)+import System.Environment (getEnvironment) import System.IO (hClose) import System.Posix.Files (fileAccess) import System.Posix.Types (EpochTime)@@ -267,6 +268,7 @@ -> IO a launchWebApp AppStartConfig {..} aid BundleConfig {..} mdir rlog WebAppConfig {..} f = do otherEnv <- pluginsGetEnv ascPlugins name bconfigPlugins+ systemEnv <- getEnvironment let httpPort = kconfigExternalHttpPort ascKeterConfig httpsPort = kconfigExternalHttpsPort ascKeterConfig (scheme, extport) =@@ -277,6 +279,7 @@ -- Ordering chosen specifically to precedence rules: app specific, -- plugins, global, and then auto-set Keter variables. [ waconfigEnvironment+ , Map.filterWithKey (\k _ -> Set.member k waconfigForwardEnv) $ Map.fromList $ map (\x -> (pack (fst x), pack (snd x))) systemEnv , Map.fromList otherEnv , kconfigEnvironment ascKeterConfig , Map.singleton "PORT" $ pack $ show waconfigPort
Keter/Proxy.hs view
@@ -12,7 +12,7 @@ import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as S8 import qualified Data.CaseInsensitive as CI-import Data.Default+import Data.Default (Default(..)) import Data.Monoid (mappend, mempty) import Data.Text.Encoding (encodeUtf8, decodeUtf8With) import Data.Text.Encoding.Error (lenientDecode)@@ -35,7 +35,7 @@ ssListing, staticApp) import qualified Network.Wai.Handler.Warp as Warp import qualified Network.Wai.Handler.WarpTLS as WarpTLS-import Network.Wai.Middleware.Gzip (gzip, def)+import Network.Wai.Middleware.Gzip (gzip) import Prelude hiding (FilePath, (++)) import WaiAppStatic.Listing (defaultListing) import System.Timeout.Lifted (timeout)
Keter/Types/V04.hs view
@@ -17,7 +17,6 @@ import Filesystem.Path.CurrentOS (encodeString) import Keter.Types.Common import Network.HTTP.ReverseProxy.Rewrite-import qualified Data.Text as T data AppConfig = AppConfig { configExec :: F.FilePath
Keter/Types/V10.hs view
@@ -327,6 +327,7 @@ , waconfigHosts :: !(Set Host) -- ^ all hosts, not including the approot host , waconfigSsl :: !Bool , waconfigPort :: !port+ , waconfigForwardEnv :: !(Set Text) } deriving Show @@ -340,6 +341,7 @@ , waconfigHosts = Set.map CI.mk hosts , waconfigSsl = ssl , waconfigPort = ()+ , waconfigForwardEnv = Set.empty } instance ParseYamlFile (WebAppConfig ()) where@@ -361,6 +363,7 @@ <*> return hosts <*> o .:? "ssl" .!= False <*> return ()+ <*> o .:? "forward-env" .!= Set.empty instance ToJSON (WebAppConfig ()) where toJSON WebAppConfig {..} = object@@ -369,6 +372,7 @@ , "env" .= waconfigEnvironment , "hosts" .= map CI.original (waconfigApprootHost : Set.toList waconfigHosts) , "ssl" .= waconfigSsl+ , "forward-env" .= waconfigForwardEnv ] data AppInput = AIBundle !FilePath !EpochTime
changelog.md view
@@ -1,3 +1,5 @@+__1.3.6__ Support the `forward-env` setting.+ __1.3.5.3__ More correct/complete solution for issue #44. Allows looking up hosts either with or without port numbers. __1.3.5.2__ Partial workaround for keter.yaml files that give a port with the hostname.
keter.cabal view
@@ -1,5 +1,5 @@ Name: keter-Version: 1.3.5.3+Version: 1.3.6 Synopsis: Web application deployment manager, focusing on Haskell web frameworks Description: Handles deployment of web apps, providing a reverse proxy to achieve zero downtime deployments. For more information, please see the README on Github: <https://github.com/snoyberg/keter#readme>