updated digiserver 2

This commit is contained in:
ske087
2025-11-12 16:07:03 +02:00
parent 2deb398fd8
commit e5a00d19a5
44 changed files with 2656 additions and 230 deletions

View File

@@ -49,10 +49,11 @@ class DevelopmentConfig(Config):
DEBUG = True
TESTING = False
# Database
# Database - construct absolute path
_basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
SQLALCHEMY_DATABASE_URI = os.getenv(
'DATABASE_URL',
'sqlite:///instance/dev.db'
f'sqlite:///{os.path.join(_basedir, "instance", "dev.db")}'
)
# Cache (simple in-memory for development)
@@ -70,10 +71,11 @@ class ProductionConfig(Config):
DEBUG = False
TESTING = False
# Database
# Database - construct absolute path
_basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
SQLALCHEMY_DATABASE_URI = os.getenv(
'DATABASE_URL',
'sqlite:///instance/dashboard.db'
f'sqlite:///{os.path.join(_basedir, "instance", "dashboard.db")}'
)
# Redis Cache