2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-10-14 21:22:20 +00:00

Installer docs (#10552)

* Better formatting

* Tweak setup docs

* Add information on process control and logs

* Fix typo

* Change `cli` to `invoke`

* Update docs/docs/start/installer.md

Co-authored-by: Matthias Mair <code@mjmair.com>

* Update docs/docs/start/installer.md

Co-authored-by: Matthias Mair <code@mjmair.com>

* Remove available commands section from installer.md

Removed section on available commands for InvenTree services.

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
Oliver
2025-10-13 09:51:07 +11:00
committed by GitHub
parent 022c48f2d3
commit 30e91eb226
3 changed files with 62 additions and 15 deletions

View File

@@ -14,7 +14,7 @@ Only stable / production releases of InvenTree include the frontend panel. This
If you want to use the frontend panel, you can either:
- use a docker image that is version-tagged or the stable version
- use a package version that is from the stable or version stream - if you are and it is not working, run `sudo inventree run cli update` to re-run the upgrade
- use a package version that is from the stable or version stream - if you are and it is not working, run `sudo inventree run invoke update` to re-run the upgrade
- install node and yarn on the server to build the frontend with the [invoke](../start/invoke.md) task `int.frontend-build`
Raise an issue if none of these options work.

View File

@@ -37,7 +37,7 @@ The installer creates the following directories:
| `/opt/inventree/` | InvenTree application files |
| `/opt/inventree/data/` | InvenTree data files |
#### Performed steps
#### Performed Steps
The installer script performs the following functions:
@@ -111,7 +111,7 @@ To stop the automatic generation of an admin user, generate an empty file needs
By default, InvenTree is served internally on port 6000 and then proxied via Nginx. The config is placed in `/etc/nginx/sites-enabled/inventree.conf` and overwritten on each update. The location can be set with the environment variable `SETUP_NGINX_FILE`.
This only serves an HTTP version of InvenTree, to use HTTPS (recommended for production) or customize any further an additional config file should be used.
#### Extra python packages
#### Extra Python Packages
Extra python packages can be installed by setting the environment variable `SETUP_EXTRA_PIP`.
#### Database Options
@@ -120,25 +120,51 @@ The used database backend can be configured with environment variables (before t
## Moving Data
To change the data storage location, link the new location to `/opt/inventree/data`.
A rough outline of steps to achieve this could be:
- shut down the app service(s) `inventree` and webserver `nginx`
- copy data to the new location
- check everything was transferred successfully
- delete the old location
- create a symlink from the old location to the new one
- start up the services again
To change the data storage location, link the new location to `/opt/inventree/data`. A rough outline of steps to achieve this could be:
- Shut down the app service(s) `inventree` and webserver `nginx`
- Copy data to the new location
- Check everything was transferred successfully
- Delete the old location
- Create a symlink from the old location to the new one
- Start up the services again
## Updating InvenTree
To update InvenTree run `apt install --only-upgrade inventree` - this might need to be run as a sudo user.
To update InvenTree run the following command, which updates the InvenTree package to the latest version:
```bash
apt install --only-upgrade inventree
```
Note that this command may need to be run as a sudo user.
## Controlling InvenTree
### Services
InvenTree installs multiple services that can be controlled with your local system runner (`service` or `systemctl`).
The service `inventree` controls everything, `inventree-web` (the [InvenTree web server](./processes.md#web-server)) and `inventree-worker` the [background worker(s)](./processes.md#background-worker).
InvenTree installs multiple services that can be controlled with your local system runner (`service` or `systemctl`):
- `inventree` - The main InvenTree service that controls the web server and background worker(s)
- `inventree-web` - The InvenTree [web server](./processes.md#web-server) process(es)
- `inventree-worker` - The InvenTree [background worker(s)](./processes.md#background-worker) process(es)
#### Restarting Services
To restart the InvenTree services, use the following commands as necessary:
```bash
# Restart all InvenTree services
inventree restart
# Restart the web server only
inventree restart web
# Restart the worker only
inventree restart worker
```
### Scaling Workers
More instances of the worker can be instantiated from the command line. This is only meant for advanced users.
@@ -180,6 +206,26 @@ For example, to print InvenTree version information:
inventree run invoke version
```
### Viewing Logs
To view the logs of the InvenTree services, use the following commands:
```bash
inventree logs
```
To view just the tail of the logs, use:
```bash
inventree logs --tail
```
Or, to follow the logs in real-time:
```bash
inventree logs --follow
```
## Architecture
The packages are provided by [packager.io](https://packager.io/). They are built each time updates are pushed to GitHub and released about 10 minutes later. The local package index must be updated to see the new release in the package manager.

View File

@@ -132,9 +132,10 @@ nav:
- Docker:
- Introduction: start/docker.md
- Installation: start/docker_install.md
- Installer:
- Installer: start/installer.md
- Bare Metal:
- Introduction: start/install.md
- Installer: start/installer.md
- Production: start/bare_prod.md
- Development: start/bare_dev.md
- User Accounts: start/accounts.md