mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 16:24:52 +09:00
Add app settings for SSH server
This commit is contained in:
parent
0ab77db612
commit
062fb5539a
3 changed files with 14 additions and 5 deletions
2
_boring
2
_boring
|
@ -123,4 +123,6 @@
|
|||
^yesod-devel(/|$)
|
||||
|
||||
### vervis
|
||||
^config/ssh-private-key$
|
||||
^config/ssh-private-key\.pub$
|
||||
^repos(/|$)
|
||||
|
|
|
@ -8,7 +8,7 @@ host: "_env:HOST:*4"
|
|||
|
||||
# The port `yesod devel` uses is distinct from this value. Set the
|
||||
# `yesod devel` port from the command line.
|
||||
port: "_env:PORT:3000"
|
||||
http-port: "_env:PORT:3000"
|
||||
|
||||
ip-from-header: "_env:IP_FROM_HEADER:false"
|
||||
|
||||
|
@ -38,5 +38,7 @@ database:
|
|||
database: "_env:PGDATABASE:vervis_dev"
|
||||
poolsize: "_env:PGPOOLSIZE:10"
|
||||
|
||||
repo-dir: repos
|
||||
copyright: Insert your statement against copyright here
|
||||
repo-dir: repos
|
||||
ssh-port: 5022
|
||||
ssh-key-file: config/ssh-private-key
|
||||
copyright: Insert your statement against copyright here
|
||||
|
|
|
@ -69,9 +69,12 @@ data AppSettings = AppSettings
|
|||
, appSkipCombining :: Bool
|
||||
-- ^ Perform no stylesheet/script combining
|
||||
|
||||
-- Example app-specific configuration values.
|
||||
, appRepoDir :: FilePath
|
||||
-- ^ Path to the directory under which git repos are placed
|
||||
, appSshPort :: Int
|
||||
-- ^ Port for the SSH server component to listen on
|
||||
, appSshKeyFile :: FilePath
|
||||
-- ^ Path to the server's SSH private key file
|
||||
, appCopyright :: Text
|
||||
-- ^ Copyright text to appear in the footer of the page
|
||||
}
|
||||
|
@ -88,7 +91,7 @@ instance FromJSON AppSettings where
|
|||
appDatabaseConf <- o .: "database"
|
||||
appRoot <- o .:? "approot"
|
||||
appHost <- fromString <$> o .: "host"
|
||||
appPort <- o .: "port"
|
||||
appPort <- o .: "http-port"
|
||||
appIpFromHeader <- o .: "ip-from-header"
|
||||
|
||||
appDetailedRequestLogging <- o .:? "detailed-logging" .!= defaultDev
|
||||
|
@ -98,6 +101,8 @@ instance FromJSON AppSettings where
|
|||
appSkipCombining <- o .:? "skip-combining" .!= defaultDev
|
||||
|
||||
appRepoDir <- o .: "repo-dir"
|
||||
appSshPort <- o .: "ssh-port"
|
||||
appSshKeyFile <- o .: "ssh-key-file"
|
||||
appCopyright <- o .: "copyright"
|
||||
|
||||
return AppSettings {..}
|
||||
|
|
Loading…
Reference in a new issue