#!/usr/bin/env bash set -e # Default values WORKERS_VALUE="${WORKERS:-4}" TIMEOUT_VALUE="${TIMEOUT:-120}" PORT_VALUE="${PORT:-10000}" echo "Starting gunicorn on port ${PORT_VALUE} with ${WORKERS_VALUE} workers and timeout ${TIMEOUT_VALUE}s" exec gunicorn --bind 0.0.0.0:${PORT_VALUE} --workers "${WORKERS_VALUE}" --timeout "${TIMEOUT_VALUE}" app:app