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
|
||||
|
||||
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
|
||||
else gitRepo "https://github.com/fpco/stackage-content.git" "master" loadWebsiteContent
|
||||
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
|
||||
-- distribution of webhooks is handled via consul
|
||||
runContentUpdates =
|
||||
|
||||
@ -39,6 +39,8 @@ data AppSettings = AppSettings
|
||||
-- behind a reverse proxy.
|
||||
, appPostgresString :: !Text
|
||||
-- ^ PostgreSQL connection string
|
||||
, appPostgresPoolsize :: !Int
|
||||
-- ^ PostgreSQL poolsize
|
||||
|
||||
, appDetailedRequestLogging :: Bool
|
||||
-- ^ Use detailed request logging system
|
||||
@ -71,6 +73,7 @@ instance FromJSON AppSettings where
|
||||
appPort <- o .: "port"
|
||||
appIpFromHeader <- o .: "ip-from-header"
|
||||
appPostgresString <- o .: "postgres-string"
|
||||
appPostgresPoolsize <- o .: "postgres-poolsize"
|
||||
|
||||
dev <- o .:? "development" .!= defaultDev
|
||||
|
||||
|
||||
@ -13,6 +13,9 @@ extra-deps:
|
||||
subdirs:
|
||||
- casa-client
|
||||
- casa-types
|
||||
- github: yesodweb/persistent
|
||||
commit: f66ed6f472ff3faa140db37bf4649e5b80be4c57
|
||||
subdirs: [persistent]
|
||||
|
||||
drop-packages:
|
||||
- Cabal
|
||||
|
||||
Loading…
Reference in New Issue
Block a user