Skip to content

Commit

Permalink
Merge pull request #68 from yuminn-k/fix/disable-ssl-connection
Browse files Browse the repository at this point in the history
🐛 데이터베이스 SSL 연결 오류 해결
  • Loading branch information
yuminn-k authored Oct 18, 2024
2 parents fd41d37 + 176370c commit 58e5d85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions bootstrap/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func connectWithRetry(dsn string, maxRetries int, retryInterval time.Duration) (
return db, nil
}
log.Printf("Failed to connect to database (attempt %d/%d): %v", i+1, maxRetries, err)
log.Printf("Error details: %+v", err)
time.Sleep(retryInterval)
}
return nil, fmt.Errorf("failed to connect to database after %d attempts: %w", maxRetries, err)
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewEnv() (*Env, error) {
env.DBUser = getEnv("DB_USER", "")
env.DBName = getEnv("DB_NAME", "")
env.DBPort = getEnv("DB_PORT", "")
env.DBSSLMode = getEnv("DB_SSLMODE", "")
env.DBSSLMode = getEnv("DB_SSLMODE", "disable")
env.DBPassword = getEnv("DB_PASSWORD", "")
env.AWSRegion = getEnv("AWS_REGION", "")
env.AccessTokenExpiryHour = getEnvAsInt("ACCESS_TOKEN_EXPIRY_HOUR", 2)
Expand Down

0 comments on commit 58e5d85

Please sign in to comment.