Tweak installer docs (#6043)

- Small improvements for installer documentation
This commit is contained in:
Oliver 2023-12-06 14:13:12 +11:00 committed by GitHub
parent e7852980ad
commit c778c067f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,8 @@
title: InvenTree Installer title: InvenTree Installer
--- ---
## Install ## Installer
The package installer places the app files in `/opt/inventree`, the configs in `/etc/inventree` and data (static, media and database) in `/opt/inventree/data` (see [Moving Data](#moving-data) for details). The InvenTree installer automates the installation procedure for a production InvenTree server.
Supported OSs are Debian 11 and Ubuntu 20.04 LTS. Supported OSs are Debian 11 and Ubuntu 20.04 LTS.
@ -15,16 +15,35 @@ wget -qO install.sh https://get.inventree.org && bash install.sh
This script does all manual steps without any input. The installation might take up to 5-10 minutes to finish. This script does all manual steps without any input. The installation might take up to 5-10 minutes to finish.
### File Locations
The installer creates the following directories:
| Directory | Description |
| --- | --- |
| `/etc/inventree/` | Configuration files |
| `/opt/inventree/` | InvenTree application files |
| `/opt/inventree/data/` | Inventree data files |
#### Performed steps #### Performed steps
The install script:
- checks if the current OS is supported The installer script performs the following functions:
- installs packages needed for getting the packages keys
- executes the manual steps listed below - Checks if the current OS is supported
- Installs packages needed for getting the packages keys
- Executes the manual steps listed below
#### Script Options #### Script Options
The install script supports pulling packages from different branches and publishers. The install script supports pulling packages from different branches and publishers.
Defaults are to use branch `stable` and publisher `inventree`. Defaults are to use branch `stable` and publisher `inventree`.
For example to install the `master` (latest) InvenTree code:
```bash
install master inventree
```
To install from branch master and publisher matmair the install command would be. To install from branch master and publisher matmair the install command would be.
```bash ```bash
install master matmair install master matmair
@ -62,17 +81,21 @@ sudo apt-get install inventree
### Options ### Options
#### Debug Outputs #### Debug Outputs
Extra debug messages are printed if the environment variable `SETUP_DEBUG` is set. This exposes passwords. Extra debug messages are printed if the environment variable `SETUP_DEBUG` is set. This exposes passwords.
#### External Calls #### External Calls
By default, a public AWS service is used to resolve the public IP address of the server. To prevent this the environment variable `SETUP_NO_CALLS` must be set to `true`. By default, a public AWS service is used to resolve the public IP address of the server. To prevent this the environment variable `SETUP_NO_CALLS` must be set to `true`.
#### Admin User #### Admin User
By default, an admin user is automatically generated with username `admin`, mail `admin@example.com` and a dynamic password that is saved to `/etc/inventree/admin_password`. By default, an admin user is automatically generated with username `admin`, mail `admin@example.com` and a dynamic password that is saved to `/etc/inventree/admin_password`.
These values can be customised with the environment variables `INVENTREE_ADMIN_USER`, `INVENTREE_ADMIN_EMAIL` and `INVENTREE_ADMIN_PASSWORD`. These values can be customised with the environment variables `INVENTREE_ADMIN_USER`, `INVENTREE_ADMIN_EMAIL` and `INVENTREE_ADMIN_PASSWORD`.
To stop the automatic generation of an admin user, generate an empty file needs to be placed at `/etc/inventree/admin_password`. To stop the automatic generation of an admin user, generate an empty file needs to be placed at `/etc/inventree/admin_password`.
#### Webconfig #### Webconfig
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`. 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 customise any further an additional config file should be used. This only serves an HTTP version of InvenTree, to use HTTPS (recommended for production) or customise any further an additional config file should be used.
@ -80,9 +103,11 @@ This only serves an HTTP version of InvenTree, to use HTTPS (recommended for pro
Extra python packages can be installed by setting the environment variable `SETUP_EXTRA_PIP`. Extra python packages can be installed by setting the environment variable `SETUP_EXTRA_PIP`.
#### Database Options #### Database Options
The used database backend can be configured with environment variables (before the first setup) or in the config file after the installation. Check the [configuration section](./config.md#database-options) for more information. The used database backend can be configured with environment variables (before the first setup) or in the config file after the installation. Check the [configuration section](./config.md#database-options) for more information.
## Moving Data ## Moving Data
To change the data storage location, link the new location to `/opt/inventree/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: A rough outline of steps to achieve this could be:
- shut down the app service(s) `inventree` and webserver `nginx` - shut down the app service(s) `inventree` and webserver `nginx`