PaperParser/config.py

25 lines
780 B
Python
Raw Permalink 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:
2024-02-11 22:22:18 +10:00
SQLALCHEMY_DATABASE_URI = f"postgresql://paper:123456789@localhost:5432/paper"
2024-01-31 20:51:31 +10:00
SQLALCHEMY_TRACK_MODIFICATIONS = False
2024-02-11 22:22:18 +10:00
UPLOAD_DIR = 'uploads'
2024-01-31 20:51:31 +10:00
CELERY = dict(
broker_url="redis://localhost:6379/0",
result_backend="redis://localhost:6379/0",
task_ignore_result=True,
)
config = DebugConfig