2022-09-02 13:23:33 +03:00
|
|
|
from os import environ
|
2023-12-24 17:25:57 +03:00
|
|
|
import sys
|
2022-09-02 13:23:33 +03:00
|
|
|
|
|
|
|
PORT = 8080
|
2022-09-03 13:50:14 +03:00
|
|
|
DB_URL = (
|
2023-11-22 21:06:45 +03:00
|
|
|
environ.get("DATABASE_URL", "").replace("postgres://", "postgresql://")
|
|
|
|
or environ.get("DB_URL", "").replace("postgres://", "postgresql://")
|
2023-10-23 17:47:11 +03:00
|
|
|
or "postgresql://postgres@localhost:5432/discoursio"
|
2022-09-03 13:50:14 +03:00
|
|
|
)
|
2022-09-02 13:23:33 +03:00
|
|
|
REDIS_URL = environ.get("REDIS_URL") or "redis://127.0.0.1"
|
2023-10-23 17:47:11 +03:00
|
|
|
API_BASE = environ.get("API_BASE") or ""
|
|
|
|
AUTH_URL = environ.get("AUTH_URL") or ""
|
2022-12-04 17:03:55 +03:00
|
|
|
SENTRY_DSN = environ.get("SENTRY_DSN")
|
2023-10-23 17:47:11 +03:00
|
|
|
DEV_SERVER_PID_FILE_NAME = "dev-server.pid"
|
2023-12-24 17:25:57 +03:00
|
|
|
MODE = "development" if "dev" in sys.argv else "production"
|
2023-12-25 04:45:21 +03:00
|
|
|
|
|
|
|
AUTH_SECRET = environ.get("AUTH_SECRET") or "nothing"
|