Cleanup build & fix development default values

This commit is contained in:
Gregor Kleen 2017-12-08 14:05:05 +01:00
parent 14ccdb1e35
commit 9fca36b07f
6 changed files with 11 additions and 11 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
**/*

View File

@ -13,12 +13,12 @@ approot: "_env:APPROOT:http://localhost:3000"
# Optional values with the following production defaults.
# In development, they default to the inverse.
#
detailed-logging: "_env:DETAILED_LOGGING:false"
should-log-all: "_env:LOG_ALL:false"
detailed-logging: "_env:DETAILED_LOGGING:invalid"
should-log-all: "_env:LOG_ALL:invalid"
# reload-templates: false
# mutable-static: false
# skip-combining: false
auth-dummy-login: "_env:DUMMY_LOGIN:false"
auth-dummy-login: "_env:DUMMY_LOGIN:invalid"
# NB: If you need a numeric value (e.g. 123) to parse as a String, wrap it in single quotes (e.g. "_env:PGPASS:'123'")
# See https://github.com/yesodweb/yesod/wiki/Configuration#parsing-numeric-values-as-strings

View File

@ -88,17 +88,17 @@ instance FromJSON AppSettings where
( appLDAPURI, appLDAPDN, appLDAPPw, appLDAPBaseName )
<- (=<< o .: "ldap") . withObject "LDAP" $ \obj -> (,,,) <$> obj .: "uri" <*> obj .: "dn" <*> obj .: "password" <*> obj .:? "basename"
appDetailedRequestLogging <- o .:? "detailed-logging" .!= defaultDev
appShouldLogAll <- o .:? "should-log-all" .!= defaultDev
appReloadTemplates <- o .:? "reload-templates" .!= defaultDev
appMutableStatic <- o .:? "mutable-static" .!= defaultDev
appSkipCombining <- o .:? "skip-combining" .!= defaultDev
appDetailedRequestLogging <- (o .:? "detailed-logging" <|> pure Nothing) .!= defaultDev
appShouldLogAll <- (o .:? "should-log-all" <|> pure Nothing) .!= defaultDev
appReloadTemplates <- (o .:? "reload-templates" <|> pure Nothing) .!= defaultDev
appMutableStatic <- (o .:? "mutable-static" <|> pure Nothing) .!= defaultDev
appSkipCombining <- (o .:? "skip-combining" <|> pure Nothing) .!= defaultDev
appCopyright <- o .: "copyright"
appAnalytics <- o .:? "analytics"
appCryptoIDKeyFile <- o .: "cryptoid-keyfile"
appAuthDummyLogin <- o .:? "auth-dummy-login" .!= defaultDev
appAuthDummyLogin <- (o .:? "auth-dummy-login" <|> pure Nothing) .!= defaultDev
return AppSettings {..}

View File

@ -6,6 +6,6 @@ in haskell.lib.buildStackProject {
inherit ghc;
name = "stackenv";
buildInputs = with pkgs;
[ postgresql zlib
[ postgresql zlib openldap cyrus_sasl.dev
];
}

View File

@ -3,7 +3,6 @@ docker:
enable: false
image: uniworx
nix:
enable: false
packages: []
pure: false
shell-file: ./stack.nix