Upload files to "backend"

This commit is contained in:
Mattia Tadini 2024-10-31 11:06:59 +00:00
parent b0514173f3
commit 6872bc031e

20
backend/config.py Normal file
View File

@ -0,0 +1,20 @@
import os
from datetime import timedelta
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or os.urandom(24)
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
'postgresql://postgres:postgres@localhost/proxy_manager'
SQLALCHEMY_TRACK_MODIFICATIONS = False
# JWT Settings
JWT_SECRET_KEY = os.environ.get('JWT_SECRET_KEY') or os.urandom(24)
JWT_ACCESS_TOKEN_EXPIRES = timedelta(hours=1)
# SSL Settings
SSL_CERT_DIR = os.environ.get('CERT_DIR') or '/opt/proxy-manager/certs'
SSL_KEY_DIR = os.environ.get('KEY_DIR') or '/opt/proxy-manager/keys'
# Proxy Settings
PROXY_CHECK_INTERVAL = 60 # seconds
STATS_COLLECTION_INTERVAL = 300 # seconds