Migrate deployment to Gitea Actions and Portainer
Build and Push Container / docker (push) Has been cancelled
Build and Push Container / docker (push) Has been cancelled
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
@@ -16,12 +17,18 @@ func ConnectDatabase(dbConnString string) {
|
||||
db, err := sql.Open("postgres", dbConnString)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("Can't connect to the database. %v", err))
|
||||
} else {
|
||||
fmt.Println("Database Connected.")
|
||||
}
|
||||
db.SetMaxOpenConns(75) // The RDS instance has a max of 75 open connections
|
||||
db.SetMaxIdleConns(5)
|
||||
db.SetConnMaxLifetime(300)
|
||||
|
||||
db.SetMaxOpenConns(5)
|
||||
db.SetMaxIdleConns(2)
|
||||
db.SetConnMaxLifetime(30 * time.Minute)
|
||||
db.SetConnMaxIdleTime(5 * time.Minute)
|
||||
|
||||
if err = db.Ping(); err != nil {
|
||||
panic(fmt.Sprintf("Can't ping the database. %v", err))
|
||||
}
|
||||
|
||||
fmt.Println("Database Connected.")
|
||||
DB = db
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"database/sql"
|
||||
"log"
|
||||
|
||||
"github.com/dustinpianalto/goff"
|
||||
"gitea.wayfinderak.com/wayfinderak/goff"
|
||||
)
|
||||
|
||||
type GuildService struct {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"database/sql"
|
||||
"log"
|
||||
|
||||
"github.com/dustinpianalto/goff"
|
||||
"gitea.wayfinderak.com/wayfinderak/goff"
|
||||
)
|
||||
|
||||
type RoleService struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package postgres
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"github.com/dustinpianalto/goff"
|
||||
"gitea.wayfinderak.com/wayfinderak/goff"
|
||||
)
|
||||
|
||||
type UserService struct {
|
||||
|
||||
Reference in New Issue
Block a user