gentle-flower-25372
02/28/2024, 5:19 PMbetter-van-82973
02/28/2024, 5:21 PMPEX_SCRIPT
or PEX_MODULE
variables?better-van-82973
02/28/2024, 5:21 PMbetter-van-82973
02/28/2024, 5:22 PMgentle-flower-25372
02/28/2024, 5:23 PMgentle-flower-25372
02/28/2024, 5:23 PMgentle-flower-25372
02/28/2024, 5:25 PM#!/bin/bash
export PEX_MODULE=gunicorn.app.wsgiapp:run
exec /usr/bin/local/my-pex-binary $@
better-van-82973
02/28/2024, 5:28 PMPEX_MODULE=gunicorn.app.wsgiapp:run /bin/app/pex
curved-television-6568
02/28/2024, 5:30 PMconscript
if you have multiple entry point scripts to bake in a single pex: https://pypi.org/project/conscript/broad-processor-92400
02/28/2024, 7:32 PMabundant-autumn-67998
02/29/2024, 1:55 AM-m entry_module
flag to it.abundant-autumn-67998
02/29/2024, 1:56 AM(venv-demo) β /tmp pex gunicorn flask -o my.pex
(venv-demo) β /tmp ./my.pex -m gunicorn --help | head
usage: __main__.py [OPTIONS] [APP_MODULE]
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-c CONFIG, --config CONFIG
:ref:`The Gunicorn config file<configuration_file>`.
[./gunicorn.conf.py]
-b ADDRESS, --bind ADDRESS
The socket to bind. [['127.0.0.1:8000']]
(venv-demo) β /tmp ./my.pex -m flask --help | head
Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory.
Usage: python -m flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
An application to load must be given with the '--app' option, 'FLASK_APP'
environment variable, or with a 'wsgi.py' or 'app.py' file in the current
directory.
Options:
-e, --env-file FILE Load environment variables from this file. python-
(venv-demo) β /tmp