feat: add simple docker compose file, change pipline, add docker build command to makefile, update db path logic in storage packages, minor fixes in handlers
This commit is contained in:
@@ -8,9 +8,9 @@ import (
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
|
||||
var db_path = os.Getenv(
|
||||
"DB_PATH",
|
||||
) + "?_journal_mode=WAL&_busy_timeout=5000&_synchronous=NORMAL&_cache_size=2000&_foreign_keys=ON"
|
||||
var path = os.Getenv("DB_PATH")
|
||||
|
||||
var params = "?_journal_mode=WAL&_busy_timeout=5000&_synchronous=NORMAL&_cache_size=2000&_foreign_keys=ON"
|
||||
|
||||
func CreateTables(db *sql.DB) error {
|
||||
logger := logger.New(false)
|
||||
@@ -24,7 +24,7 @@ func CreateTables(db *sql.DB) error {
|
||||
}
|
||||
|
||||
func OpenSession() (*sql.DB, error) {
|
||||
db, err := sql.Open("sqlite", db_path)
|
||||
db, err := sql.Open("sqlite", path+params)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user