Browse Source

Updated sample config and config docs with example for postgres session provider_config string, #2118

Torkel Ödegaard 10 years ago
parent
commit
901685bb63
3 changed files with 3 additions and 0 deletions
  1. 1 0
      conf/defaults.ini
  2. 1 0
      conf/sample.ini
  3. 1 0
      docs/sources/installation/configuration.md

+ 1 - 0
conf/defaults.ini

@@ -73,6 +73,7 @@ provider = file
 # memory: not have any config yet
 # file: session dir path, is relative to grafana data_path
 # redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,grafana`
+# postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
 # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1)/database_name`
 
 provider_config = sessions

+ 1 - 0
conf/sample.ini

@@ -74,6 +74,7 @@
 # file: session dir path, is relative to grafana data_path
 # redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,grafana`
 # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1)/database_name`
+# postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
 ;provider_config = sessions
 
 # Session cookie name

+ 1 - 0
docs/sources/installation/configuration.md

@@ -323,6 +323,7 @@ session provider you have configured.
 
 - **file:** session file path, e.g. `data/sessions`
 - **mysql:** go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1)/database_name`
+- **postgres:** ex:  user=a password=b host=localhost port=5432 dbname=c sslmode=disable
 
 If you use MySQL or Postgres as the session store you need to create the
 session table manually.