diff --git a/clients/pg.go b/clients/pg.go index 6ca5943..897c2c8 100644 --- a/clients/pg.go +++ b/clients/pg.go @@ -2,6 +2,7 @@ package clients import ( "context" + "crypto/tls" "time" "github.com/go-pg/pg/v10" @@ -53,6 +54,9 @@ func NewPostgreSQL(config *viper.Viper, logger *logrus.Logger) *pg.DB { Password: config.GetString("database.password"), Database: config.GetString("database.database"), PoolSize: config.GetInt("database.pool"), + TLSConfig: &tls.Config{ + InsecureSkipVerify: true, + }, }) if config.GetBool("database.debug") { diff --git a/narada/commands/migrations.go b/narada/commands/migrations.go index ce385a6..dbf8129 100644 --- a/narada/commands/migrations.go +++ b/narada/commands/migrations.go @@ -110,7 +110,7 @@ func CreateMigration(p *narada.Narada) *cli.Command { func connect(v *viper.Viper) (*sql.DB, error) { dsn := fmt.Sprintf( - "postgres://%s:%s@%s/%s?sslmode=disable", + "postgres://%s:%s@%s/%s", v.GetString("database.user"), v.GetString("database.password"), v.GetString("database.addr"),