Fix auth default PGHOST

This commit is contained in:
Zoe Roux 2025-04-30 14:51:53 +02:00
parent 39dcfb4418
commit 1fca8957a2
No known key found for this signature in database

View File

@ -80,7 +80,7 @@ func OpenDatabase() (*pgxpool.Pool, error) {
} }
// Set default values // Set default values
if config.ConnConfig.Host == "" { if config.ConnConfig.Host == "/tmp" {
config.ConnConfig.Host = "postgres" config.ConnConfig.Host = "postgres"
} }
if config.ConnConfig.Database == "" { if config.ConnConfig.Database == "" {
@ -113,7 +113,7 @@ func OpenDatabase() (*pgxpool.Pool, error) {
db, err := pgxpool.NewWithConfig(ctx, config) db, err := pgxpool.NewWithConfig(ctx, config)
if err != nil { if err != nil {
fmt.Printf("Could not connect to database, check your env variables!") fmt.Printf("Could not connect to database, check your env variables!\n")
return nil, err return nil, err
} }