#!/bin/bash

# Set default values for Gunicorn options
WORKERS=5
BIND=0.0.0.0:5000
MODULE_NAME="app:app"  # Format: <module_name>:<application_instance>
TIMEOUT=120

# Change directory to the location of the Flask app
cd /api-wrapper

# Run Gunicorn with specified options
exec gunicorn --workers $WORKERS --worker-class gevent --timeout $TIMEOUT --bind $BIND $MODULE_NAME