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
This commit is contained in:
Your Name
2026-09-09 13:23:36 +08:00
parent 057d72b264
commit 931a64dbc8
6 changed files with 507 additions and 57 deletions
+7 -53
View File
@@ -1,57 +1,11 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
*.egg
*.egg-info/
dist/
build/
.eggs/
.installed.cfg
*.egg
# Virtual envs
venv/
env/
.venv/
ENV/
# pytest / coverage
.pytest_cache/
.coverage
htmlcov/
.tox/
# IDE
.idea/
.vscode/
*.swp
*.swo
.DS_Store
# Logs
*.log
# Local instance (sqlite db, uploaded files, generated certs)
# runtime data
instance/
uploads/
backups/
uploads/
ssl_certs/
alerts/
instances/
log_storage/
security/
# Sample artifacts
*.pid
*.sock
*.pid.lock
# Local config overrides
*.pyc
__pycache__/
*.pyc
*.pyo
.env
.env.local
# OS
Thumbs.db
*.log