https://promptfoo.dev/ logo
Need help debugging self-hosted container on Azure
# ❓|questions
a
Hello, I have been trying to setup a self-hosted instance of
promptfoo
so that my team can share eval links. It works great without any mounted volume but we want persistence to monitor progress. As soon as I mount an AzureFileShare on the
PROMPTFOO_CONFIG_DIR
location, the container starts failing with this error. Can someone please help me out?
Copy code
Error running database migrations: Failed to run the query '
                        CREATE TABLE IF NOT EXISTS "__drizzle_migrations" (
                                id SERIAL PRIMARY KEY,
                                hash text NOT NULL,
                                created_at numeric
                        )
                '
Server running at http://localhost:3000 and monitoring for new evals.
Migrated results from file system to database
/app/node_modules/better-sqlite3/lib/methods/wrappers.js:5
        return this[cppdb].prepare(sql, this, false);
                           ^
SqliteError: no such table: evals
    at Database.prepare (/app/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
    at BetterSQLiteSession.prepareQuery (/app/node_modules/drizzle-orm/better-sqlite3/session.cjs:42:30)
    at BetterSQLiteSession.prepareOneTimeQuery (/app/node_modules/drizzle-orm/sqlite-core/session.cjs:91:17)
    at SQLiteSelectBase._prepare (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.cjs:595:88)
    at SQLiteSelectBase.all (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.cjs:611:17)
    at SQLiteSelectBase.execute (/app/node_modules/drizzle-orm/sqlite-core/query-builders/select.cjs:620:17)
    at SQLiteSelectBase.then (/app/node_modules/drizzle-orm/query-promise.cjs:44:17) {
  code: 'SQLITE_ERROR'
}
u
Are you sure the container can talk to the file share? Did it create a .db file?
I’ll test this out today
@amwal0108_00632 are you building the docker container yourself or using the pre-built image
I just tested this locally and everything seems to work, I think it might be something with your Azure setup.
a
Hey @[Promptfoo] Steve , thanks for checking. Yes, the container can talk to the file share and its creating the .db file. After that it is failing when trying to run migrations. I tried locally as well and it works for me. My doubt is also on AzureFileShare setup. Wondering if anybody has experienced this before. Thanks again for taking a look
I did build the docker image myself as well