fix: use DATABASE_FILE env var consistently and update Dockerfile

This commit is contained in:
2026-05-13 15:55:19 +02:00
parent afbfc59452
commit 239957d261
2 changed files with 3 additions and 6 deletions

View File

@@ -24,10 +24,7 @@ var Module = fx.Options(
)
func ProvideSQLDB() (*sql.DB, error) {
dbPath := os.Getenv("DB_PATH")
if dbPath == "" {
dbPath = "mal.db"
}
dbPath := db.GetDBFile()
dbConn, err := db.Open(dbPath)
if err != nil {
return nil, fmt.Errorf("failed to open database: %w", err)