add dockerfiler

This commit is contained in:
2026-04-01 15:12:00 +02:00
parent 7292751ef7
commit 7bce56384f
4 changed files with 47 additions and 11 deletions

View File

@@ -59,9 +59,13 @@ func InitSQLiteStore(path string) error {
return nil
}
// FindAndOpenSQLiteStore walks up from the current working directory to find
// an .ax.db file and opens it.
// FindAndOpenSQLiteStore opens the SQLite database. If the AX_DB_PATH environment
// variable is set, it uses that path directly. Otherwise, it walks up from the
// current working directory to find an .ax.db file.
func FindAndOpenSQLiteStore() (Store, error) {
if dbpath := os.Getenv("AX_DB_PATH"); dbpath != "" {
return NewSQLiteStore(dbpath)
}
dir, err := filepath.Abs(".")
if err != nil {
return nil, err