mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-11 19:58:28 +01:00
Configurable poolsize, longer timeout
This commit is contained in:
parent
3393217f66
commit
0823066401
@ -23,3 +23,4 @@ force-ssl: false
|
|||||||
# dev-download: false
|
# dev-download: false
|
||||||
|
|
||||||
postgres-string: "_env:PGSTRING:host=localhost port=5432 user=stackage dbname=stackage password=stackage"
|
postgres-string: "_env:PGSTRING:host=localhost port=5432 user=stackage dbname=stackage password=stackage"
|
||||||
|
postgres-poolsize: "_env:PGPOOLSIZE:8"
|
||||||
|
|||||||
@ -140,7 +140,7 @@ withFoundation appLogFunc appSettings inner = do
|
|||||||
gitRepoDev fp loadWebsiteContent
|
gitRepoDev fp loadWebsiteContent
|
||||||
else gitRepo "https://github.com/fpco/stackage-content.git" "master" loadWebsiteContent
|
else gitRepo "https://github.com/fpco/stackage-content.git" "master" loadWebsiteContent
|
||||||
let pgConf =
|
let pgConf =
|
||||||
PostgresConf {pgPoolSize = 2, pgConnStr = encodeUtf8 $ appPostgresString appSettings}
|
PostgresConf {pgPoolSize = appPostgresPoolsize appSettings, pgConnStr = encodeUtf8 $ appPostgresString appSettings}
|
||||||
-- Temporary workaround to force content updates regularly, until
|
-- Temporary workaround to force content updates regularly, until
|
||||||
-- distribution of webhooks is handled via consul
|
-- distribution of webhooks is handled via consul
|
||||||
runContentUpdates =
|
runContentUpdates =
|
||||||
|
|||||||
@ -39,6 +39,8 @@ data AppSettings = AppSettings
|
|||||||
-- behind a reverse proxy.
|
-- behind a reverse proxy.
|
||||||
, appPostgresString :: !Text
|
, appPostgresString :: !Text
|
||||||
-- ^ PostgreSQL connection string
|
-- ^ PostgreSQL connection string
|
||||||
|
, appPostgresPoolsize :: !Int
|
||||||
|
-- ^ PostgreSQL poolsize
|
||||||
|
|
||||||
, appDetailedRequestLogging :: Bool
|
, appDetailedRequestLogging :: Bool
|
||||||
-- ^ Use detailed request logging system
|
-- ^ Use detailed request logging system
|
||||||
@ -71,6 +73,7 @@ instance FromJSON AppSettings where
|
|||||||
appPort <- o .: "port"
|
appPort <- o .: "port"
|
||||||
appIpFromHeader <- o .: "ip-from-header"
|
appIpFromHeader <- o .: "ip-from-header"
|
||||||
appPostgresString <- o .: "postgres-string"
|
appPostgresString <- o .: "postgres-string"
|
||||||
|
appPostgresPoolsize <- o .: "postgres-poolsize"
|
||||||
|
|
||||||
dev <- o .:? "development" .!= defaultDev
|
dev <- o .:? "development" .!= defaultDev
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,9 @@ extra-deps:
|
|||||||
subdirs:
|
subdirs:
|
||||||
- casa-client
|
- casa-client
|
||||||
- casa-types
|
- casa-types
|
||||||
|
- github: yesodweb/persistent
|
||||||
|
commit: f66ed6f472ff3faa140db37bf4649e5b80be4c57
|
||||||
|
subdirs: [persistent]
|
||||||
|
|
||||||
drop-packages:
|
drop-packages:
|
||||||
- Cabal
|
- Cabal
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user