modified: Dockerfile
modified: config.py modified: docker-compose.yml
This commit is contained in:
@@ -9,7 +9,7 @@ BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
class Config:
|
||||
SECRET_KEY = os.environ.get("SECRET_KEY", "change-me-in-production")
|
||||
_db_uri = os.environ.get("DATABASE_URI", "")
|
||||
_default_uri = f"sqlite:///{os.path.join(BASE_DIR, 'app.db')}"
|
||||
_default_uri = f"sqlite:///{os.path.join(BASE_DIR, 'data', 'app.db')}"
|
||||
# Fall back to SQLite if DATABASE_URI is empty or not a valid SQLAlchemy URL
|
||||
SQLALCHEMY_DATABASE_URI = (
|
||||
_db_uri if _db_uri and "://" in _db_uri else _default_uri
|
||||
|
||||
Reference in New Issue
Block a user