File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,22 @@ const usage = `
20
20
Postgres-CI app-server
21
21
22
22
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)
24
24
-debug (enable debug mode)
25
25
26
26
Environment variables:
27
27
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
36
39
`
37
40
38
41
func main () {
Original file line number Diff line number Diff line change @@ -70,9 +70,9 @@ func (c *Config) setFromEnv() {
70
70
port = uint32 (value )
71
71
}
72
72
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 " )
76
76
c .Connect = Connect {
77
77
Host : os .Getenv ("DB_HOST" ),
78
78
Port : port ,
You can’t perform that action at this time.
0 commit comments