Update installation routine and docs

- Single call of "make install" does everything
- Add backup_dir option to yaml config file
This commit is contained in:
Oliver Walters 2019-08-01 20:07:06 +10:00
parent e55d59ebf1
commit 5ee07eae7c
5 changed files with 26 additions and 10 deletions

View File

@ -231,4 +231,6 @@ IMPORT_EXPORT_USE_TRANSACTIONS = True
# Settings for dbbsettings app
DBBACKUP_STORAGE = 'django.core.files.storage.FileSystemStorage'
DBBACKUP_STORAGE_OPTIONS = {'location': tempfile.gettempdir()}
DBBACKUP_STORAGE_OPTIONS = {
'location': CONFIG.get('backup_dir', tempfile.gettempdir()),
}

View File

@ -43,4 +43,8 @@ media_root: './media'
static_root: './static'
# Logging options
log_queries: False
log_queries: False
# Backup options
# Set the backup_dir parameter to store backup files in a specific location
# backup_dir = "/home/me/inventree-backup/"

View File

@ -16,13 +16,17 @@ migrate:
python3 InvenTree/manage.py migrate --run-syncdb
python3 InvenTree/manage.py check
install:
requirements:
pip3 install -U -r requirements.txt
secret:
python3 InvenTree/keygen.py
superuser:
python3 InvenTree/manage.py createsuperuser
install: requirements secret migrate superuser
style:
flake8 InvenTree

View File

@ -47,4 +47,9 @@ For further information, refer to the following documentation:
Uploaded File Storage
---------------------
By default, uploaded files are stored in the local direction ``./media``. This directory should be changed based on the particular installation requirements.
By default, uploaded files are stored in the local direction ``./media``. This directory should be changed based on the particular installation requirements.
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.

View File

@ -24,6 +24,8 @@ which performs the following actions:
* Installs all required Python packages using pip package manager
* Generates a SECREY_KEY file required for the django authentication framework
* Performs initial database installation and migrations
* Prompts user to create a superuser account
Install Configuration
---------------------
@ -34,15 +36,10 @@ The configuration file provides administrators control over various setup option
For further information on installation configuration, refer to the `Configuration <config.html>`_ section.
Superuser Account
-----------------
Run ``make superuser`` to create a superuser account, required for initial system login.
Run Development Server
----------------------
Run ``python3 InvenTree/manage.py runserver`` to launch a development server. This will launch the InvenTree web interface at ``127.0.0.1:8000``. For other options refer to the `django docs <https://docs.djangoproject.com/en/2.2/ref/django-admin/>`_.
Run ``python3 InvenTree/manage.py runserver 127.0.0.1:8000`` to launch a development server. This will launch the InvenTree web interface at ``127.0.0.1:8000``. For other options refer to the `django docs <https://docs.djangoproject.com/en/2.2/ref/django-admin/>`_.
Database Migrations
-------------------
@ -54,6 +51,10 @@ Development and Testing
Other shorthand functions are provided for the development and testing process:
* ``make requirements`` - Install all required underlying packages using PIP
* ``make secret`` - Generate the SECRET_KEY file for session validation
* ``make superuser`` - Create a superuser account
* ``make backup`` - Backup database tables and media files
* ``make test`` - Run all unit tests
* ``make coverage`` - Run all unit tests and generate code coverage report
* ``make style`` - Check Python codebase against PEP coding standards (using Flake)