summaryrefslogtreecommitdiff
path: root/internal/config/defaults.go
diff options
context:
space:
mode:
authorLibravatar embr <git@liclac.eu>2021-12-21 12:08:27 +0100
committerLibravatar GitHub <noreply@github.com>2021-12-21 12:08:27 +0100
commited9158fa05f43aa3e6f33892621d8a637bbd3f9c (patch)
tree40f0bd7aa5d2f7a20f155f26feff8a2ac64dc43c /internal/config/defaults.go
parentExtend license notices to 2022 (#354) (diff)
downloadgotosocial-ed9158fa05f43aa3e6f33892621d8a637bbd3f9c.tar.xz
[fix] Make postgres connections magically work in common setups (#352)
* Don't use the system 'postgres' database by default * Use postgres adapter defaults The pgx code actually goes to great lengths to make postgres connections Just Work(tm) out of the box, including supporting `~/.pg_service.conf`, SSL certificates, UNIX sockets if it can find a socket at a common path, and falling back to TCP to localhost if not. (On Windows, it won't try to use UNIX sockets, but will read credentials from %appdata% as is standard over there.) By applying our flags as overrides only when they're specified, database connections should Just Work(tm) anywhere `psql gotosocial` does.
Diffstat (limited to 'internal/config/defaults.go')
-rw-r--r--internal/config/defaults.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/config/defaults.go b/internal/config/defaults.go
index 323e5d622..cf3e7b449 100644
--- a/internal/config/defaults.go
+++ b/internal/config/defaults.go
@@ -34,11 +34,11 @@ var Defaults = Values{
TrustedProxies: []string{"127.0.0.1/32"}, // localhost
DbType: "postgres",
- DbAddress: "localhost",
+ DbAddress: "",
DbPort: 5432,
- DbUser: "postgres",
- DbPassword: "postgres",
- DbDatabase: "postgres",
+ DbUser: "",
+ DbPassword: "",
+ DbDatabase: "gotosocial",
DbTLSMode: "disable",
DbTLSCACert: "",