Skip to content Skip to sidebar Skip to footer

How To Connect Docker Volume 'database/app.db' To Sqlalchemy?

I am using Python 3.8.1 Flask latest and app running fine but unable to connect the docker volume from SQLAlchemy and if the database does not exist it should create the database,

Solution 1:

This doesn't look like a Docker volume issue, it looks like you are trying to access the database using a path as the URI instead of: sqlite:////path/to/db.db

See: https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls

Specifically for sqlite: https://docs.sqlalchemy.org/en/13/core/engines.html#sqlite

Post a Comment for "How To Connect Docker Volume 'database/app.db' To Sqlalchemy?"