update autopol 4 nov
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user