1- HOST = 0.0.0.0
1+ # DevBin Backend Environment Configuration
2+
3+ # Server Configuration
24APP_PORT = 8000
5+ APP_HOST = 0.0.0.0
6+ APP_WORKERS = 1
7+ APP_RELOAD = false
8+ APP_DEBUG = false
9+
10+ # Database Configuration
11+ APP_DATABASE_URL = postgresql+asyncpg://postgres:postgres@localhost:5432/devbin
12+
13+ # Security - HTTPS
14+ # Set to true to redirect HTTP to HTTPS
15+ # Only enable if your deployment terminates SSL directly
16+ # Keep false if using reverse proxy (nginx, traefik, caddy, etc.)
17+ APP_ENFORCE_HTTPS = false
18+
19+ # Security - CORS
20+ # For development (allows all origins):
21+ APP_CORS_DOMAINS = ["*"]
22+ APP_ALLOW_CORS_WILDCARD = true
23+
24+ # For production (specify exact domains):
25+ # APP_CORS_DOMAINS=["https://devbin.example.com","https://app.devbin.example.com"]
26+ # APP_ALLOW_CORS_WILDCARD=false
327
4- # Database configuration
5- POSTGRES_USER = postgres
6- POSTGRES_PASSWORD = postgres
7- POSTGRES_DB = devbin
28+ # Trusted Hosts (for X-Forwarded-For header)
29+ APP_TRUSTED_HOSTS = ["127.0.0.1"]
830
9- # Application configuration
10- APP_DATABASE_URL = postgresql://postgres:postgres@devbin_db:5432/devbin
31+ # Paste Configuration
1132APP_MAX_CONTENT_LENGTH = 10000
1233APP_BASE_FOLDER_PATH = ./files
13- # 1-9999999 or True for "os.cpu_count" ( how many cpu threads the machine has )
14- # WARNING: Rate Limit / Cache is PER worker. e.g. expect 2x memore as both will cache different/doubles.
15- APP_WORKERS = 1
16- APP_BYPASS_TOKEN = # Bypasses Rate limits
17- APP_CORS_DOMAINS = ' ["http://localhost:3000"]'
18- APP_CACHE_TTL = 300
19- APP_CACHE_SIZE_LIMIT = 1000
2034APP_MIN_STORAGE_MB = 1024
21- APP_TRUSTED_HOSTS = ' ["127.0.0.1", ' devbin_frontend']'
22- APP_KEEP_DELETED_PASTES_TIME_HOURS = 336 # 2 Weeks
35+ APP_KEEP_DELETED_PASTES_TIME_HOURS = 336
2336
24- # Debug / Development settings
25- APP_SQLALCHEMY_ECHO = false
26- APP_DEBUG = true
27- APP_RELOAD = false
37+ # Caching
38+ APP_CACHE_SIZE_LIMIT = 1000
39+ APP_CACHE_TTL = 300
40+
41+ # Privacy Settings
42+ APP_SAVE_USER_AGENT = false
43+ APP_SAVE_IP_ADDRESS = false
2844
29- # Frontend configurations
30- API_BASE_URL = http://devden:8000
31- PORT = 3000
45+ # Optional: Rate limit bypass token for trusted apps
46+ # APP_BYPASS_TOKEN=your_secret_bypass_token_here
0 commit comments