From 2f3154fedefcee2868ce1a9590196e6681d7cbe7 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 30 Mar 2021 21:19:50 +1100 Subject: [PATCH] Rearrange docs (cherry picked from commit b2667d52a37036d579030b9f3de0cded341e700e) --- docs/admin/tasks.md | 23 +++++++++++++++++++++++ docs/start/config.md | 23 +++++++---------------- docs/start/docker.md | 5 +++++ docs/start/intro.md | 22 ++++++++++++++++++---- docs/start/tasks.md | 6 ------ docs/start/update.md | 3 +++ mkdocs.yml | 6 ++++-- 7 files changed, 60 insertions(+), 28 deletions(-) create mode 100644 docs/admin/tasks.md create mode 100644 docs/start/docker.md delete mode 100644 docs/start/tasks.md diff --git a/docs/admin/tasks.md b/docs/admin/tasks.md new file mode 100644 index 0000000..369f8f3 --- /dev/null +++ b/docs/admin/tasks.md @@ -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. diff --git a/docs/start/config.md b/docs/start/config.md index b997061..7b4d301 100644 --- a/docs/start/config.md +++ b/docs/start/config.md @@ -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. -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 @@ -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* * (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. !!! info "MySQL Collation" @@ -111,12 +108,6 @@ PostgreSQL database backend is supported with the native Django implementation. * libpq-dev * (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. 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 -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. ### 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. ### 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. diff --git a/docs/start/docker.md b/docs/start/docker.md new file mode 100644 index 0000000..8904eb9 --- /dev/null +++ b/docs/start/docker.md @@ -0,0 +1,5 @@ +--- +title: Docker Setup +--- + +## Docker Setup \ No newline at end of file diff --git a/docs/start/intro.md b/docs/start/intro.md index cf76da2..9983e5f 100644 --- a/docs/start/intro.md +++ b/docs/start/intro.md @@ -37,7 +37,7 @@ Once a database is setup, you need a way of accessing the data. InvenTree provid ### 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 @@ -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). -## 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). 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). +### Docker + +InvenTree can be installed using docker, if that's your thing. + +Refer to the [docker instructions](../docker). diff --git a/docs/start/tasks.md b/docs/start/tasks.md deleted file mode 100644 index 38dfa8f..0000000 --- a/docs/start/tasks.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Background Tasks ---- - -## Background Tasks - diff --git a/docs/start/update.md b/docs/start/update.md index 032f3f6..e0fe291 100644 --- a/docs/start/update.md +++ b/docs/start/update.md @@ -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. +!!! info "Stop Server" + The method by which the InvenTree server is stopped depends on your particular installation! + ### Update Source Code Update the InvenTree source code to the latest version (or a particular commit if required). diff --git a/mkdocs.yml b/mkdocs.yml index bb61afe..409e135 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -44,9 +44,10 @@ nav: - Contribute: contribute.md - Getting Started: - Introduction: start/intro.md + - Configuration: start/config.md - Development: start/install.md - - Deploying: start/deploy.md - - Configure: start/config.md + - Production: start/deploy.md + - Docker: start/docker.md - Updating: start/update.md - Migrating: start/migrate.md - Parts: @@ -88,6 +89,7 @@ nav: - Import Data: admin/import.md - Python Shell: admin/shell.md - Error Logs: admin/logs.md + - Background Tasks: admin/tasks.md - Extend: - API: extend/api.md - Python Interface: extend/python.md