20 lines
568 B
Bash
20 lines
568 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Use PORT environment variable or default to 5000
|
|
PORT=${PORT:-5000}
|
|
|
|
# Run gunicorn with the specified port and comprehensive logging
|
|
# --access-logfile -: Send access logs to stdout
|
|
# --error-logfile -: Send error logs to stdout
|
|
# --log-level info: Set logging level to info
|
|
# --capture-output: Capture stdout/stderr from workers
|
|
# --timeout 120: Increase timeout for long-running requests
|
|
exec gunicorn -w 4 -b "0.0.0.0:${PORT}" \
|
|
--access-logfile - \
|
|
--error-logfile - \
|
|
--log-level info \
|
|
--capture-output \
|
|
--timeout 120 \
|
|
app:app
|