Gunicorn
Installation
pip install gunicorn
        
Source Code
import dash
import dash_html_components as html

app = dash.Dash(__name__)
server = app.server

app.layout = html.Div('Hello World!')

if __name__ == "__main__":
    app.run_server(host='0.0.0.0', port=8080)
		
Command Line
# guncorn [app_file_name]:[server_name]
# --bind [ip]:[port], specify host ip and socket
# --workers [num], number of worker processes, generally 2-4 per core
# --timeout [seconds], http time out
# --worker-class [workerclass], one of sync (default), eventlet, gevent, tornado, gthread
# --reload, restart workers when code changes
# --access-logfile, specify log file
# --error-logfile, specify error log file
# --log-level, one of 'debug', 'info' (default), 'warning', 'error', 'critical'
gunicorn --bind=localhost:8000 --workers=2 --timeout=120 --reload --access-logfile=log.txt app:server
		
Config File
# gunicorn.conf.py
bind = "127.0.0.1:8000"
workers = 2
timeout = 120
        
gunicorn --config gunicorn.conf.py app:server
        
Reference
  • Document