getAlby / lndhub.go

Accounting wrapper for the Lightning Network. It provides separate accounts for end-users. (LndHub compatible API written in Go)
GNU General Public License v3.0
86 stars 23 forks source link

postgresql ssl disabled possible for local testing? #323

Closed lujakob closed 1 year ago

lujakob commented 1 year ago

Is it possible to disable ssl for postgresql connection by adding ?sslmode=disable to the url like suggested in https://stackoverflow.com/a/30787336/1713747 or do I need to set it up locally as explained in https://bobcares.com/blog/postgres-ssl-is-not-enabled-on-the-server/

Unfortunately I get panic: pgdriver: sslmode 'disabled' is not supported

Is there an easy way around this problem?

kiwiidb commented 1 year ago

For me, setting this environment variable just works out-of-the-box: DATABASE_URI=postgresql://kwinten:kwinten@localhost:5432/lndhub?sslmode=disable Is it possible that you made a typo? The log line indicates disableD instead of disable.

lujakob commented 1 year ago

My error was I had postgres:// prefix. Now that I used postgresql:// it works. Awesome, thanks.