2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-27 21:26:43 +00:00

Update installation docs for bare metal (#449)

- Remove references to explicit paths
- Link back to the config page
This commit is contained in:
Oliver 2023-03-05 21:33:21 +11:00 committed by GitHub
parent 2b8590eb5d
commit 7e9283e5e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 32 deletions

View File

@ -63,9 +63,9 @@ An administrator account can be specified using the following environment variab
| Environment Variable | Configuration File | Description | Default | | Environment Variable | Configuration File | Description | Default |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| INVENTREE_ADMIN_USER | admin_user | Admin account username | *Not set* | | INVENTREE_ADMIN_USER | admin_user | Admin account username | *Not specified* |
| INVENTREE_ADMIN_PASSWORD | admin_password | Admin account password | *Not set* | | INVENTREE_ADMIN_PASSWORD | admin_password | Admin account password | *Not specified* |
| INVENTREE_ADMIN_EMAIL | admin_email |Admin account email address | *Not set* | | INVENTREE_ADMIN_EMAIL | admin_email |Admin account email address | *Not specified* |
!!! info "Administrator Account" !!! info "Administrator Account"
Providing `INVENTREE_ADMIN` credentials will result in the provided account being created with *superuser* permissions when InvenTree is started. Providing `INVENTREE_ADMIN` credentials will result in the provided account being created with *superuser* permissions when InvenTree is started.
@ -90,8 +90,8 @@ If not specified via environment variables, the fallback secret_key file (automa
| Environment Variable | Configuration File | Description | Default | | Environment Variable | Configuration File | Description | Default |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| INVENTREE_SECRET_KEY | secret_key | Raw secret key value | *Not set* | | INVENTREE_SECRET_KEY | secret_key | Raw secret key value | *Not specified* |
| INVENTREE_SECRET_KEY_FILE | secret_key_file | File containing secret key value | *Not set* | | INVENTREE_SECRET_KEY_FILE | secret_key_file | File containing secret key value | *Not specified* |
## Database Options ## Database Options
@ -103,12 +103,12 @@ The following database options can be configured:
| Environment Variable | Configuration File | Description | Default | | Environment Variable | Configuration File | Description | Default |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| INVENTREE_DB_ENGINE | database.ENGINE | Database backend | *Not set* | | INVENTREE_DB_ENGINE | database.ENGINE | Database backend | *Not specified* |
| INVENTREE_DB_NAME | database.NAME | Database name | *Not set* | | INVENTREE_DB_NAME | database.NAME | Database name | *Not specified* |
| INVENTREE_DB_USER | database.USER | Database username (if required) | *Not set* | | INVENTREE_DB_USER | database.USER | Database username (if required) | *Not specified* |
| INVENTREE_DB_PASSWORD | database.PASSWORD | Database password (if required) | *Not set* | | INVENTREE_DB_PASSWORD | database.PASSWORD | Database password (if required) | *Not specified* |
| INVENTREE_DB_HOST | database.HOST | Database host address (if required) | *Not set* | | INVENTREE_DB_HOST | database.HOST | Database host address (if required) | *Not specified* |
| INVENTREE_DB_PORT | database.PORT | Database host port (if required) | *Not set* | | INVENTREE_DB_PORT | database.PORT | Database host port (if required) | *Not specified* |
### PostgreSQL Settings ### PostgreSQL Settings
@ -140,13 +140,13 @@ The following email settings are available:
| Environment Variable | Configuration File | Description | Default | | Environment Variable | Configuration File | Description | Default |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| INVENTREE_EMAIL_BACKEND | email.backend | Email backend module | django.core.mail.backends.smtp.EmailBackend | | INVENTREE_EMAIL_BACKEND | email.backend | Email backend module | django.core.mail.backends.smtp.EmailBackend |
| INVENTREE_EMAIL_HOST | email.host | Email server host | *Not set* | | INVENTREE_EMAIL_HOST | email.host | Email server host | *Not specified* |
| INVENTREE_EMAIL_PORT | email.port | Email server port | 25 | | INVENTREE_EMAIL_PORT | email.port | Email server port | 25 |
| INVENTREE_EMAIL_USERNAME | email.username | Email account username | *Not set* | | INVENTREE_EMAIL_USERNAME | email.username | Email account username | *Not specified* |
| INVENTREE_EMAIL_PASSWORD | email.password | Email account password | *Not set* | | INVENTREE_EMAIL_PASSWORD | email.password | Email account password | *Not specified* |
| INVENTREE_EMAIL_TLS | email.tls | Enable TLS support | False | | INVENTREE_EMAIL_TLS | email.tls | Enable TLS support | False |
| INVENTREE_EMAIL_SSL | email.ssl | Enable SSL support | False | | INVENTREE_EMAIL_SSL | email.ssl | Enable SSL support | False |
| INVENTREE_EMAIL_SENDER | email.sender | Name of sender | *Not set* | | INVENTREE_EMAIL_SENDER | email.sender | Name of sender | *Not specified* |
| INVENTREE_EMAIL_PREFIX | email.prefix | Prefix for subject text | [InvenTree] | | INVENTREE_EMAIL_PREFIX | email.prefix | Prefix for subject text | [InvenTree] |
## Supported Currencies ## Supported Currencies
@ -178,18 +178,32 @@ For further information, refer to the following documentation:
## File Storage Locations ## File Storage Locations
InvenTree requires some external directories for storing files:
| Environment Variable | Configuration File | Description | Default |
| --- | --- | --- | --- |
| INVENTREE_STATIC_ROOT | static_root | List of allowed hosts | *Not specified* |
| INVENTREE_MEDIA_ROOT | media_root | Allow all remote URLS for CORS checks | *Not specified* |
| INVENTREE_BACKUP_DIR | backup_dir | List of whitelisted CORS URLs | *Not specified* |
### Static File Storage ### Static File Storage
Static files **require** a local directory for storage. This directory should be specified with the `static_root` option in the config file based on the particular installation requirements. Static files **require** a local directory for storage. This directory should be specified with the `static_root` option in the config file based on the particular installation requirements.
Alternatively this location can be specified with the `INVENTREE_STATIC_ROOT` environment variable. Alternatively this location can be specified with the `INVENTREE_STATIC_ROOT` environment variable.
!!! warning "Required"
The static file directory must be specified, or the server will not start
### Uploaded File Storage ### Uploaded File Storage
Uploaded media files **require** a local directory for storage. This directory should be specified with the `media_root` option in the config file based on the particular installation requirements. Uploaded media files **require** a local directory for storage. This directory should be specified with the `media_root` option in the config file based on the particular installation requirements.
Alternatively this location can be specified with the `INVENTREE_MEDIA_ROOT` environment variable. Alternatively this location can be specified with the `INVENTREE_MEDIA_ROOT` environment variable.
!!! warning "Required"
The media file directory must be specified, or the server will not start
### Backup File Storage ### Backup File Storage
Database and media backups **require** a local directory for storage. This directory should be specified with the `backup_dir` option in the config file based on the particular installation requirements. Database and media backups **require** a local directory for storage. This directory should be specified with the `backup_dir` option in the config file based on the particular installation requirements.
@ -244,10 +258,10 @@ The logo and custom messages can be changed/set:
| Environment Variable | Configuration File | Description | Default | | Environment Variable | Configuration File | Description | Default |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| INVENTREE_CUSTOM_LOGO | customize.logo | Path to custom logo in the static files directory | *Not set* | | INVENTREE_CUSTOM_LOGO | customize.logo | Path to custom logo in the static files directory | *Not specified* |
| INVENTREE_CUSTOM_SPLASH | customize.splash | Path to custom splash screen in the static files directory | *Not set* | | INVENTREE_CUSTOM_SPLASH | customize.splash | Path to custom splash screen in the static files directory | *Not specified* |
| INVENTREE_CUSTOMIZE | customize.login_message | Custom message for login page | *Not set* | | INVENTREE_CUSTOMIZE | customize.login_message | Custom message for login page | *Not specified* |
| INVENTREE_CUSTOMIZE | customize.navbar_message | Custom message for navbar | *Not set* | | INVENTREE_CUSTOMIZE | customize.navbar_message | Custom message for navbar | *Not specified* |
If you want to remove the InvenTree branding as far as possible from your end-user also check the [global server settings](../settings/global.md#server-settings). If you want to remove the InvenTree branding as far as possible from your end-user also check the [global server settings](../settings/global.md#server-settings).
@ -264,8 +278,8 @@ The following [plugin](../extend/plugins.md) configuration options are available
| Environment Variable | Configuration File | Description | Default | | Environment Variable | Configuration File | Description | Default |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| INVENTREE_PLUGINS_ENABLED | plugins_enabled | Enable plugin support | False | | INVENTREE_PLUGINS_ENABLED | plugins_enabled | Enable plugin support | False |
| INVENTREE_PLUGIN_FILE | plugins_plugin_file | Location of plugin installation file | *Not set* | | INVENTREE_PLUGIN_FILE | plugins_plugin_file | Location of plugin installation file | *Not specified* |
| INVENTREE_PLUGIN_DIR | plugins_plugin_dir | Location of external plugin directory | *Not set* | | INVENTREE_PLUGIN_DIR | plugins_plugin_dir | Location of external plugin directory | *Not specified* |
## Other Options ## Other Options

View File

@ -4,14 +4,17 @@ title: Install InvenTree
## Bare Metal Setup ## Bare Metal Setup
!!! tip "Docker Guide"
This guide is for a *bare metal* InvenTree installation. If you want to install using Docker (the recommended approach) refer to the [Docker Guide](./docker.md)
!!! tip "Installer" !!! tip "Installer"
There is an [installer](./installer.md) available - we recommend using that method. There is an [installer](./installer.md) available - we recommend using that method.
!!! tip "Docker Guide"
This guide is for a *bare metal* InvenTree installation. If you want to install using Docker refer to the [Docker Setup Guide](./docker.md)
Follow the instructions below to install the required system packages, python modules, and InvenTree source code. Follow the instructions below to install the required system packages, python modules, and InvenTree source code.
!!! warning "Experienced Users Only"
The following instructions assume a reasonably advanced level of system administration knowledge for a linux based OS
### Install System Packages ### Install System Packages
Install required system packages (as superuser): Install required system packages (as superuser):
@ -56,16 +59,19 @@ sudo su inventree
### Create Required Directories ### Create Required Directories
``` In addition to the location where the InvenTree source code is located, you will need to create some directories for storing data which will be served to the user (and thus must be available to the webserver). The location of these directories must be provided to the server via the [configuration options](./config.md).
cd /home/inventree
mkdir log static data
```
This step creates directories required by InvenTree: #### Static Files
* `/home/inventree/log` - Store InvenTree log files InvenTree requires a directory for storage of [static files](./config.md#static-file-storage).
* `/home/inventree/static` - Location of static files for the web server
* `/home/inventre/data` - Location of uploaded media files #### Media Files
InvenTree requires a directory for storage of [user uploaded files](./config.md#uploaded-file-storage)
#### Backup Directory
Location for storing [database backups](./config.md#backup-file-storage)
### Download Source Code ### Download Source Code