mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 16:42:25 -05:00
[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.
This commit is contained in:
parent
ef5a9256a8
commit
ed9158fa05
3 changed files with 25 additions and 33 deletions
|
|
@ -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: "",
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue