2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +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:
Oliver
2025-01-06 09:46:16 +11:00
committed by GitHub
parent 6b5e0dbb29
commit 0614f01247
9 changed files with 77 additions and 10 deletions

View File

@ -107,7 +107,8 @@ source ./env/bin/activate
The Python packages required by the InvenTree server must be installed into the virtual environment.
```
pip install --require-hashes -U -r src/backend/requirements.txt
pip install --upgrade --ignore-installed invoke
invoke install
```
This installs all required Python packages using pip package manager. It also creates a (default) database configuration file which needs to be edited to meet user needs before proceeding (see next step below).

View File

@ -82,6 +82,24 @@ Or, if that does not work, try:
This will place the current shell session inside a virtual environment - the terminal should display the ``(env)`` prefix.
### Invoke in Virtual Environment
If you are using a virtual environment (and you should be!) you will need to ensure that you have installed the `invoke` package inside the virtual environment! If the invoke commands are run from outside the virtual environment, they may not work correctly - and may be extremely difficult to debug!
To install the `invoke` package inside the virtual environment, run the following command (after activating the virtual environment):
```
pip install --upgrade --ignore-installed invoke
```
To check that the `invoke` package is correctly installed, run the following command:
```
which invoke
```
This should return the path to the `invoke` binary inside the virtual environment. If the path is *not* inside the virtual environment, the `invoke` package is not correctly installed!
## InvenTree Source Code
InvenTree source code is distributed on [GitHub](https://github.com/inventree/inventree/), and the latest version can be downloaded (using Git) with the following command: