mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat: Support config files with viper (#4558)
This commit is contained in:
@ -6,6 +6,10 @@ import (
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
const (
|
||||
FlagName = "global-config"
|
||||
)
|
||||
|
||||
// Root represents the configuration directory.
|
||||
type Root string
|
||||
|
||||
@ -42,6 +46,10 @@ func (r Root) PostgresPort() File {
|
||||
return File(filepath.Join(r.PostgresPath(), "port"))
|
||||
}
|
||||
|
||||
func (r Root) DeploymentConfigPath() string {
|
||||
return filepath.Join(string(r), "server.yaml")
|
||||
}
|
||||
|
||||
// File provides convenience methods for interacting with *os.File.
|
||||
type File string
|
||||
|
||||
|
Reference in New Issue
Block a user