Skip to content

Commit a73e43a

Browse files
committed
change params name
1 parent ddde207 commit a73e43a

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

app-server.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,22 @@ const usage = `
2020
Postgres-CI app-server
2121
2222
Usage:
23-
-c /path/to/config.yaml (if not setted app will use environment variables)
23+
-c /path/to/config.yaml (if not set, then app-server will use environment variables)
2424
-debug (enable debug mode)
2525
2626
Environment variables:
2727
28-
APP_ADDRESS (example: 127.0.0.1:8888)
29-
APP_TEMPLATES (example: /opt/postgres-ci/app-server/templates/)
30-
APP_LOG_LEVEL (one of: info/warning/error)
31-
DB_HOST (example: 10.20.11.42)
32-
DB_PORT (example: 5432)
33-
DB_USERNAME (example: postgres_ci)
34-
DB_PASSWORD (example: PcSd23@@a)
35-
DB_DATABASE (example: postgres_ci)
28+
ADDRESS - bind address ip:port
29+
TEMPLATES - path to templates dir
30+
LOG_LEVEL - one of: info/warning/error
31+
32+
== PostgreSQL server credentials
33+
34+
DB_HOST
35+
DB_PORT
36+
DB_USERNAME
37+
DB_PASSWORD
38+
DB_DATABASE
3639
`
3740

3841
func main() {

src/common/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ func (c *Config) setFromEnv() {
7070
port = uint32(value)
7171
}
7272

73-
c.Address = os.Getenv("APP_ADDRESS")
74-
c.Templates = os.Getenv("APP_TEMPLATES")
75-
c.Loglevel = os.Getenv("APP_LOG_LEVEL")
73+
c.Address = os.Getenv("ADDRESS")
74+
c.Templates = os.Getenv("TEMPLATES")
75+
c.Loglevel = os.Getenv("LOG_LEVEL")
7676
c.Connect = Connect{
7777
Host: os.Getenv("DB_HOST"),
7878
Port: port,

0 commit comments

Comments
 (0)