PaperParser/config.py

24 lines
756 B
Python
Raw Normal View History

2024-01-31 19:37:01 +10:00
import os
basedir = os.path.abspath(os.path.dirname(__file__))
2024-01-31 20:51:31 +10:00
class ProductionConfig:
2024-01-31 19:37:01 +10:00
SQLALCHEMY_DATABASE_URI = f"postgresql://{os.environ.get('POSTGRES_USER')}:{os.environ.get('POSTGRES_PASSWORD')}@postgres/{os.environ.get('POSTGRES_DB')}"
SQLALCHEMY_TRACK_MODIFICATIONS = False
CELERY = dict(
broker_url="redis://redis/0",
result_backend="redis://redis/0",
task_ignore_result=True,
)
2024-01-31 20:51:31 +10:00
class DebugConfig:
SQLALCHEMY_DATABASE_URI = f"postgresql://postgres:123456789@localhost:5432/paper"
SQLALCHEMY_TRACK_MODIFICATIONS = False
CELERY = dict(
broker_url="redis://localhost:6379/0",
result_backend="redis://localhost:6379/0",
task_ignore_result=True,
)
config = DebugConfig