demander IA de faire tous les modifications pour que le webapp soit pret au déploiement.

Force connection HTTPS, proxy-inversé, WSGI de production, reset cookie de conncection à chaque reconnection, limite sur les mdp, fichiers et One on One par minute, verification d'injection de SQL dans les champs d'entrées. renommage des fichiers lors du téléchargement, fichier de backup quotidien pour la bd et j'ai oublié quelque chose :(
This commit is contained in:
cedrick2711
2026-07-25 18:47:27 -04:00
parent afdf6ded0e
commit 666673fa8f
24 changed files with 2513 additions and 171 deletions
+37
View File
@@ -0,0 +1,37 @@
"""WSGI entry point for the Team Tryouts application.
This module provides the production WSGI server using Waitress (Windows).
Use this file to start the application in production instead of Flask's
built-in development server.
Usage:
python wsgi.py
Configuration via environment variables:
PORT: Port to listen on (default: 5000)
WAITRESS_THREADS: Number of worker threads (default: CPU*2+1)
"""
import os
import multiprocessing
from app import create_app
app = create_app()
if __name__ == '__main__':
from waitress import serve
port = int(os.getenv('PORT', 5000))
threads = int(os.getenv('WAITRESS_THREADS', multiprocessing.cpu_count() * 2 + 1))
host = os.getenv('HOST', '127.0.0.1') # Bind to localhost by default (Nginx reverse proxy)
print(f'Starting Waitress server on {host}:{port} with {threads} threads')
serve(
app,
host=host,
port=port,
threads=threads,
# Graceful shutdown settings
channel_timeout=30, # Seconds to wait for in-flight requests
cleanup_interval=30,
)