Files
squid-manager/.env.example
T
Your Name 931a64dbc8 feat: add one-click deploy script + project optimization
- deploy.sh: one-click deployment (squid + venv + pip + gunicorn + systemd)
- gunicorn_config.py: unified gunicorn config with env var overrides
- .env.example: env var template for SECRET_KEY, port, workers, security
- wsgi.py: create all runtime dirs (uploads, ssl_certs); optional dotenv loading
- requirements.txt: add python-dotenv + cryptography
- .gitignore: cover runtime dirs, .env, pyc files
2026-09-09 13:23:36 +08:00

27 lines
801 B
Bash

# Runtime data — generated by deploy.sh, consumed by app.py
# Copy this file to .env and adjust as needed, or export the vars before starting.
# Flask session secret — MUST be changed in production!
# Generate with: python3 -c "import secrets; print(secrets.token_urlsafe(48))"
SECRET_KEY=change-me-in-production
# Bind address / port (gunicorn)
SQUIDMGR_HOST=0.0.0.0
SQUIDMGR_PORT=5200
SQUIDMGR_WORKERS=2
SQUIDMGR_TIMEOUT=120
# Squid paths (override if squid is in a non-standard location)
# SQUID_BINARY=squid
# SQUID_CONF=/etc/squid/squid.conf
# SQUID_ACCESS_LOG=/var/log/squid/access.log
# SQUID_CACHE_LOG=/var/log/squid/cache.log
# Session / security
SQUIDMGR_IDLE_TO=1800
SQUIDMGR_ABS_TO=28800
SQUIDMGR_THROTTLE_WIN=300
SQUIDMGR_THROTTLE_MAX=5
SQUIDMGR_THROTTLE_LOCK=900
SQUIDMGR_CSRF=1