mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 10:05:39 +00:00
Docker fix (#8835)
* Fix server command in Dockerfile * Ensure invoke is installed into the venv * Run extra check in docker build step * Improve documentation * Intercept ModuleNotFoundError - Clear error message * Docs updates * Add extra check to dev docker build * Cleanup tasks.py * Prevent double activation of venv * Change order of operations --------- Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
@ -40,14 +40,17 @@ if [[ -n "$INVENTREE_PY_ENV" ]]; then
|
||||
if test -d "$INVENTREE_PY_ENV"; then
|
||||
# venv already exists
|
||||
echo "Using Python virtual environment: ${INVENTREE_PY_ENV}"
|
||||
source ${INVENTREE_PY_ENV}/bin/activate
|
||||
else
|
||||
# Setup a virtual environment (within the "data/env" directory)
|
||||
# Setup a virtual environment (within the provided directory)
|
||||
echo "Running first time setup for python environment"
|
||||
python3 -m venv ${INVENTREE_PY_ENV} --system-site-packages --upgrade-deps
|
||||
|
||||
# Ensure invoke tool is installed locally
|
||||
source ${INVENTREE_PY_ENV}/bin/activate
|
||||
python3 -m pip install --ignore-installed --upgrade invoke
|
||||
fi
|
||||
|
||||
# Now activate the venv
|
||||
source ${INVENTREE_PY_ENV}/bin/activate
|
||||
fi
|
||||
|
||||
cd ${INVENTREE_HOME}
|
||||
|
Reference in New Issue
Block a user