Есть config.py:
DB_URI = '{driver}://{auth}{server}/{db_name}'.format(
driver=DB_DRIVER,
auth='{login}:{password}@'.format(login=DB_LOGIN, password=DB_PASS) if DB_LOGIN and DB_PASS else '',
server='{host}:{port}'.format(host=DB_HOST, port=DB_PORT) if DB_HOST and DB_PORT else '',
host=DB_HOST,
port=DB_PORT,
db_name=DB_NAME
)
Есть .env:
DB_DRIVER = postgres
DB_NAME = database_name
DB_LOGIN = database_user
DB_PASS = database_password
DB_HOST = localhost
DB_PORT = 5432
DB_URI = postgresql://database_user:database_password@@db:5432/database_name
В логах ошибка:
raise exc.NoSuchModuleError(
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres