3M/config.example.py
2025-03-19 00:05:43 +00:00

30 lines
No EOL
1.3 KiB
Python

import os
SECRETKEY = os.path.join("keys", "3m.pem")
# CEF-specific port (grumble communicates over it as well)
ERGO_ADDR = os.getenv("THREEM_ERGO_ADDR") or "127.0.0.1"
ERGO_PORT = os.getenv("THREEM_ERGO_PORT") or 22843
MINIO_INTERNAL_ADDR = os.getenv("THREEM_MINIO_INTERNAL_ADDR") or "http://127.0.0.1:9000" # dodges nginx
MINIO_INTERNAL_SECURE = os.getenv("THREEM_MINIO_INTERNAL_SECURE") == "true" or False
MINIO_EXTERNAL_ADDR = os.getenv("THREEM_MINIO_EXTERNAL_ADDR") or "data.example.xyz"
MINIO_ACCESS_KEY = os.getenv("THREEM_MINIO_ACCESS_KEY") or "access-key-goes-here"
MINIO_SECRET_KEY = os.getenv("THREEM_MINIO_SECRET_KEY") or "secret-key-goes-here"
DBURL = os.getenv("THREEM_DBURL") or "mysql+mysqldb://ergo:password@localhost/ergo_ext"
REDIS_ADDR = os.getenv("THREEM_REDIS_ADDR") or "localhost"
MEDIAMTX_API = os.getenv("THREEM_MEDIAMTX_API") or "http://localhost:9997"
MEDIAMTX_RTSP = os.getenv("THREEM_MEDIAMTX_RTSP") or "localhost:8554"
MAX_FILE_SIZE = 1024*1024*20
MAX_PFP_SIZE = 1024*1024*1.5
# It's a 24x24 image, you can fit that in 32k
MAX_ICON_SIZE = 1024*32
# Some endpoints are restricted by accessing IP (bad, I know, but it's what I got for the moment)
# This causes a lookup at initialization to limit those endpoints. Mainly for Docker
PRIVILEGED_HOSTS = ["localhost"]
# Need to figure out how to make this cooperate more
ALLOWED_DOMAINS = ["*"]