update autopol 4 nov

This commit is contained in:
2026-11-04 20:36:01 +01:00
parent 315ceb16d1
commit 2f3cf2a347
20 changed files with 6391 additions and 79 deletions
+16
View File
@@ -25,13 +25,29 @@ UPDATE vehiculos SET itv = NULL WHERE TRIM(itv) = '';
ALTER TABLE vehiculos MODIFY itv DATE NULL;
UPDATE vehiculos SET lanzadestellos = NULL WHERE TRIM(lanzadestellos) = '';
ALTER TABLE vehiculos MODIFY lanzadestellos INT;
pip install -r requirements.txt
python app.py
# → http://127.0.0.1:5000
Gunicorn
Solucionar problemas carga lenta en paginas web, modificar Dockerfile:
CMD ["gunicorn", "-b", "0.0.0.0:5000", "--workers", "3", "--threads", "4", "--worker-class", "gthread", "--timeout", "60", "app:app"]
gunicorn -b 0.0.0.0:5000 --workers 3 --threads 4 --worker-class gthread --timeout 60 app:app
Luego reconstruye con docker compose up -d --build
gunicorn -w 2 -b 0.0.0.0:5000 app:app
Ejecutar con Python en segundo plano
nohup python app.py > flask.log 2>&1 &
Comprobar que esta activo