Postgres socket authentication (#1052)

* Allow to connect to postgres via socket auth

* Add changelog entry for new env-vars

Co-authored-by: Uku Taht <Uku.taht@gmail.com>
This commit is contained in:
Maximilian Bosch 2021-05-26 14:40:56 +02:00 committed by GitHub
parent 55030b837d
commit 4ff25f68c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -7,6 +7,8 @@ All notable changes to this project will be documented in this file.
- New parameter `metrics` for the `/api/v1/stats/timeseries` endpoint plausible/analytics#952
- CSV export now includes pageviews, bounce rate and visit duration in addition to visitors plausible/analytics#952
- Send stats to multiple dashboards by configuring a comma-separated list of domains plausible/analytics#968
- To authenticate against a local postgresql via socket authentication, the environment-variables
`DATABASE_SOCKET_DIR` & `DATABASE_NAME` were added.
- Time on Page metric available in detailed Top Pages report plausible/analytics#1007
- Glob (wildcard) based page, entry page and exit page filters plausible/analytics#1067
- Exclusion filters for page, entry page and exit page filters plausible/analytics#1067

View File

@ -109,7 +109,15 @@ config :plausible, PlausibleWeb.Endpoint,
http: [port: port],
secret_key_base: secret_key_base
config :plausible, Plausible.Repo, url: db_url
case System.get_env("DATABASE_SOCKET_DIR", "") do
"" ->
config :plausible, Plausible.Repo, url: db_url
x ->
config :plausible, Plausible.Repo,
socket_dir: x,
database: System.get_env("DATABASE_NAME")
end
config :sentry,
dsn: sentry_dsn,