2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-28 05:36:46 +00:00

Rearrange docs

(cherry picked from commit b2667d52a37036d579030b9f3de0cded341e700e)
This commit is contained in:
Oliver Walters 2021-03-30 21:19:50 +11:00
parent 92ed904907
commit 2f3154fede
7 changed files with 60 additions and 28 deletions

23
docs/admin/tasks.md Normal file
View File

@ -0,0 +1,23 @@
---
title: Background Tasks
---
## Background Tasks
In addition to managing the database and providing a web interface, InvenTree runs various background tasks;
### Blocking Operations
Some tasks (such as sending emails or performing bulk database actions) may take a significant amount of time. Instead of delaying the response to the user, these tasks are handled by the background task manager.
### Periodic Tasks
Some tasks must be performed on a periodic basis.
## Django Q
InvenTree uses the [django-q](https://django-q.readthedocs.io/en/latest/) background task manager.
## Admin Interface
Scheduled tasks can be viewed in the InvenTree admin interface.

View File

@ -6,7 +6,10 @@ title: Database Configuration
Admin users will need to adjust the InvenTree installation to meet the particular needs of their setup. For example, pointing to the correct database backend, or specifying a list of allowed hosts. Admin users will need to adjust the InvenTree installation to meet the particular needs of their setup. For example, pointing to the correct database backend, or specifying a list of allowed hosts.
The Django configuration parameters are found in the normal place (*settings.py*). However the settings presented in this file should not be adjusted as they will alter the core behaviour of the InvenTree application. InvenTree system settings can be specified in a configuration file, or via environment variables.
!!! info "Environment Variables"
Settings specified using environment variables take priority
### Configuration File ### Configuration File
@ -90,12 +93,6 @@ MySQL database backend is supported with the native Django implemetation. To run
* libmysqlclient-dev - *Required for connecting to the MySQL database in Python* * libmysqlclient-dev - *Required for connecting to the MySQL database in Python*
* (pip) mysqlclient - *Python package for communication with MySQL database* * (pip) mysqlclient - *Python package for communication with MySQL database*
To install these required packages, run the following command:
```
inv mysql
```
It is then up to the database adminstrator to create a new MySQL database to store inventree data, in addition to a username/password to access the data. It is then up to the database adminstrator to create a new MySQL database to store inventree data, in addition to a username/password to access the data.
!!! info "MySQL Collation" !!! info "MySQL Collation"
@ -111,12 +108,6 @@ PostgreSQL database backend is supported with the native Django implementation.
* libpq-dev * libpq-dev
* (pip3) psycopg2 * (pip3) psycopg2
To install these required packages, run the following commands:
```
inv postgresql
```
It is then up to the database adminstrator to create a new PostgreSQL database to store inventree data, in addition to a username/password to access the data. It is then up to the database adminstrator to create a new PostgreSQL database to store inventree data, in addition to a username/password to access the data.
The database options (in the `config.yaml` file) then need to be adjusted to communicate the PostgreSQL backend. Refer to the [Django docs](https://docs.djangoproject.com/en/dev/ref/databases/) for further information. The database options (in the `config.yaml` file) then need to be adjusted to communicate the PostgreSQL backend. Refer to the [Django docs](https://docs.djangoproject.com/en/dev/ref/databases/) for further information.
@ -132,19 +123,19 @@ For further information, refer to the following documentation:
### Static File Storage ### Static File Storage
By default, static files are stored in the local directory `./inventree_static`. This directory should be changed by specifying the `static_root` option in the config file based on the particular installation requirements. By default, static files are stored in the local directory `/home/inventree/static`. This directory should be changed by specifying 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.
### Uploaded File Storage ### Uploaded File Storage
By default, uploaded media files are stored in the local directory `./inventree_media`. This directory should be changed by specifying the `media_root` option in the config file based on the particular installation requirements. By default, uploaded media files are stored in the local directory `/home/inventree/media`. This directory should be changed by specifying 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.
### Backup Location ### Backup Location
The default behaviour of the database backup is to generate backup files for database tables and media files to the user's temporary directory. The target directory can be overridden by setting the `backup_dir` parameter in the config file. The default behaviour of the database backup is to generate backup files for database tables and media files to `/home/inventree/backup`. The target directory can be overridden by setting the `backup_dir` parameter in the config file.
Alternatively this location can be specified with the `INVENTREE_BACKUP_DIR` environment variable. Alternatively this location can be specified with the `INVENTREE_BACKUP_DIR` environment variable.

5
docs/start/docker.md Normal file
View File

@ -0,0 +1,5 @@
---
title: Docker Setup
---
## Docker Setup

View File

@ -37,7 +37,7 @@ Once a database is setup, you need a way of accessing the data. InvenTree provid
### Background Tasks ### Background Tasks
A separate application handles management of [background tasks](../tasks), separate to user-facing web requests. A separate application handles management of [background tasks](../../admin/tasks), separate to user-facing web requests.
## OS Requirements ## OS Requirements
@ -125,15 +125,29 @@ git clone https://github.com/inventree/inventree/
Alternatively, the source can be downloaded as a [.zip archive](https://github.com/inventree/InvenTree/archive/master.zip). Alternatively, the source can be downloaded as a [.zip archive](https://github.com/inventree/InvenTree/archive/master.zip).
## Development Setup ## Installation Guides
There are multiple ways to get an InvenTree server up and running, of various complexity (and robustness)!
### Development Server
To setup a *simple* development server, refer to the [development instructions](../install). To setup a *simple* development server, refer to the [development instructions](../install).
These instructions are useful for those wishing to run a development server. This setup may suffice for a small-scale installation with only a small number of users. These instructions are useful for those wishing to run a development server. This setup may suffice for a small-scale installation with only a small number of users.
However for a robust server setup which supports high traffic and multiple users, it is highly recommended that the [deployment guide](../deploy) is followed instead. !!! warning "Not for production"
The development server is not to be used for a production environment.
## Deployment Guide For a robust server setup which supports high traffic and multiple users, it is highly recommended that the [deployment guide](../deploy) is followed instead.
### Production Server
A production server install requires greater consideration.
To properly deploy a robust InvenTree server setup, refer to the [deployment instructions](../deploy). To properly deploy a robust InvenTree server setup, refer to the [deployment instructions](../deploy).
### Docker
InvenTree can be installed using docker, if that's your thing.
Refer to the [docker instructions](../docker).

View File

@ -1,6 +0,0 @@
---
title: Background Tasks
---
## Background Tasks

View File

@ -13,6 +13,9 @@ Administrators wishing to update InvenTree to the latest version should follow t
Ensure the InvenTree server is stopped. This will depend on the particulars of your database installation. Ensure the InvenTree server is stopped. This will depend on the particulars of your database installation.
!!! info "Stop Server"
The method by which the InvenTree server is stopped depends on your particular installation!
### Update Source Code ### Update Source Code
Update the InvenTree source code to the latest version (or a particular commit if required). Update the InvenTree source code to the latest version (or a particular commit if required).

View File

@ -44,9 +44,10 @@ nav:
- Contribute: contribute.md - Contribute: contribute.md
- Getting Started: - Getting Started:
- Introduction: start/intro.md - Introduction: start/intro.md
- Configuration: start/config.md
- Development: start/install.md - Development: start/install.md
- Deploying: start/deploy.md - Production: start/deploy.md
- Configure: start/config.md - Docker: start/docker.md
- Updating: start/update.md - Updating: start/update.md
- Migrating: start/migrate.md - Migrating: start/migrate.md
- Parts: - Parts:
@ -88,6 +89,7 @@ nav:
- Import Data: admin/import.md - Import Data: admin/import.md
- Python Shell: admin/shell.md - Python Shell: admin/shell.md
- Error Logs: admin/logs.md - Error Logs: admin/logs.md
- Background Tasks: admin/tasks.md
- Extend: - Extend:
- API: extend/api.md - API: extend/api.md
- Python Interface: extend/python.md - Python Interface: extend/python.md