Gunicorn: log to stdout/stderr + preload for crash visibility
All checks were successful
Build and Deploy PunktFri / build-and-deploy (push) Successful in 47s
All checks were successful
Build and Deploy PunktFri / build-and-deploy (push) Successful in 47s
- --access-logfile - : access logs to stdout (visible in Nomad)
- --error-logfile - : error logs to stderr (visible in Nomad)
- --log-level info : show startup and worker events
- --preload : load app before forking workers — crashes
surface immediately instead of silently dying
This commit is contained in:
@@ -26,4 +26,4 @@ RUN mkdir -p /app/instance
|
|||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
CMD ["sh", "-c", "gunicorn --bind ${HOST}:${PORT} --workers 2 --timeout 60 app:app"]
|
CMD ["sh", "-c", "gunicorn --bind ${HOST}:${PORT} --workers 2 --timeout 60 --access-logfile - --error-logfile - --log-level info --preload app:app"]
|
||||||
|
|||||||
Reference in New Issue
Block a user