Moving virtual environments between systems is problematic... and unnecessary when creating container images. These modifications allow the ability to install app dependencies into the system python, and use that instead of a virtual environment.
27 lines
399 B
Bash
Executable File
27 lines
399 B
Bash
Executable File
#!/bin/bash
|
|
|
|
reap() {
|
|
kill -TERM $child
|
|
sleep 0.1
|
|
exit
|
|
}
|
|
|
|
trap reap TERM INT
|
|
|
|
# If a command fails, exit the script
|
|
set -e
|
|
|
|
# Ensure we are in the app root directory (not the /script directory)
|
|
cd "$(dirname "${0}")/.."
|
|
|
|
if [ -z "${SKIP_PIPENV+xxxx}" ]; then
|
|
CMD_PREFIX='pipenv run '
|
|
fi
|
|
PYTHON_CMD="${CMD_PREFIX}python"
|
|
|
|
# Launch the app
|
|
${PYTHON_CMD} app.py ${@} &
|
|
child=$!
|
|
|
|
wait $child
|