Add basic postgres db config

This commit is contained in:
2023-01-13 23:25:41 -07:00
parent 1864cd2bee
commit ddf9fda092
6 changed files with 161 additions and 1 deletions
+16
View File
@@ -28,6 +28,14 @@ type Runner struct {
Secret string
}
type DBConfig struct {
Address string
Port int
Username string
Password string
Name string
}
type MountType string
const (
@@ -50,6 +58,7 @@ type PipelineConf struct {
type Config struct {
Address string
Port int
DBConfig DBConfig
PipelineConf PipelineConf
Jobs map[string]Job
Runners map[string]Runner
@@ -63,6 +72,13 @@ func GetConfig() (config.Config[Config], error) {
Config: Config{
Address: "127.0.0.1",
Port: 45420,
DBConfig: DBConfig{
Address: "DB_ADDRESS",
Port: 5432,
Username: "USERNAME",
Password: "PASSWORD",
Name: "cursorius",
},
PipelineConf: PipelineConf{
AccessURL: "cursorius-server:45420",
DockerNetwork: &defaultNetworkName,