mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
125 lines
4.4 KiB
YAML
125 lines
4.4 KiB
YAML
|
|
# Database backend selection - Configure backend database settings
|
|
# Ref: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-DATABASES
|
|
# Specify database parameters below as they appear in the Django docs
|
|
|
|
# Note: Database configuration options can also be specified from environmental variables,
|
|
# with the prefix INVENTREE_DB_
|
|
# e.g INVENTREE_DB_NAME / INVENTREE_DB_USER / INVENTREE_DB_PASSWORD
|
|
database:
|
|
# Default configuration - sqlite filesystem database
|
|
ENGINE: sqlite3
|
|
NAME: '../inventree_default_db.sqlite3'
|
|
|
|
# For more complex database installations, further parameters are required
|
|
# Refer to the django documentation for full list of options
|
|
|
|
# --- Available options: ---
|
|
# ENGINE: Database engine. Selection from:
|
|
# - sqlite3
|
|
# - mysql
|
|
# - postgresql
|
|
# NAME: Database name
|
|
# USER: Database username (if required)
|
|
# PASSWORD: Database password (if required)
|
|
# HOST: Database host address (if required)
|
|
# PORT: Database host port (if required)
|
|
|
|
# --- Example Configuration - sqlite3 ---
|
|
# ENGINE: sqlite3
|
|
# NAME: '/path/to/database.sqlite3'
|
|
|
|
# --- Example Configuration - MySQL ---
|
|
#ENGINE: django.db.backends.mysql
|
|
#NAME: inventree
|
|
#USER: inventree_username
|
|
#PASSWORD: inventree_password
|
|
#HOST: '127.0.0.1'
|
|
#PORT: '5432'
|
|
|
|
# Select default system language (default is 'en-us')
|
|
language: en-us
|
|
|
|
# System time-zone (default is UTC)
|
|
# Reference: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
# Select an option from the "TZ database name" column
|
|
timezone: UTC
|
|
|
|
# List of currencies supported by default.
|
|
# Add other currencies here to allow use in InvenTree
|
|
currencies:
|
|
- AUD
|
|
- CAD
|
|
- EUR
|
|
- GBP
|
|
- JPY
|
|
- NZD
|
|
- USD
|
|
|
|
# Set debug to False to run in production mode
|
|
debug: True
|
|
|
|
# Set debug_toolbar to True to enable a debugging toolbar for InvenTree
|
|
# Note: This will only be displayed if DEBUG mode is enabled,
|
|
# and only if InvenTree is accessed from a local IP (127.0.0.1)
|
|
debug_toolbar: False
|
|
|
|
# Configure the system logging level
|
|
# Options: DEBUG / INFO / WARNING / ERROR / CRITICAL
|
|
log_level: WARNING
|
|
|
|
# Allowed hosts (see ALLOWED_HOSTS in Django settings documentation)
|
|
# A list of strings representing the host/domain names that this Django site can serve.
|
|
# Default behaviour is to allow all hosts (THIS IS NOT SECURE!)
|
|
allowed_hosts:
|
|
- '*'
|
|
|
|
# Cross Origin Resource Sharing (CORS) settings (see https://github.com/ottoyiu/django-cors-headers)
|
|
# Following parameters are
|
|
cors:
|
|
# CORS_ORIGIN_ALLOW_ALL - If True, the whitelist will not be used and all origins will be accepted.
|
|
allow_all: True
|
|
|
|
# CORS_ORIGIN_WHITELIST - A list of origins that are authorized to make cross-site HTTP requests. Defaults to []
|
|
# whitelist:
|
|
# - https://example.com
|
|
# - https://sub.example.com
|
|
|
|
# MEDIA_ROOT is the local filesystem location for storing uploaded files
|
|
# By default, it is stored in a directory named 'inventree_media' local to the InvenTree directory
|
|
# This should be changed for a production installation
|
|
media_root: '../inventree_media'
|
|
|
|
# STATIC_ROOT is the local filesystem location for storing static files
|
|
# By default it is stored in a directory named 'inventree_static' local to the InvenTree directory
|
|
static_root: '../inventree_static'
|
|
|
|
# Optional URL schemes to allow in URL fields
|
|
# By default, only the following schemes are allowed: ['http', 'https', 'ftp', 'ftps']
|
|
# Uncomment the lines below to allow extra schemes
|
|
#extra_url_schemes:
|
|
# - mailto
|
|
# - git
|
|
# - ssh
|
|
|
|
# Backup options
|
|
# Set the backup_dir parameter to store backup files in a specific location
|
|
# If unspecified, the local user's temp directory will be used
|
|
#backup_dir: '/home/inventree/backup/'
|
|
|
|
# Permit custom authentication backends
|
|
#authentication_backends:
|
|
# - 'django.contrib.auth.backends.ModelBackend'
|
|
|
|
# Custom middleware, sometimes needed alongside an authentication backend change.
|
|
#middleware:
|
|
# - 'django.middleware.security.SecurityMiddleware'
|
|
# - 'django.contrib.sessions.middleware.SessionMiddleware'
|
|
# - 'django.middleware.locale.LocaleMiddleware'
|
|
# - 'django.middleware.common.CommonMiddleware'
|
|
# - 'django.middleware.csrf.CsrfViewMiddleware'
|
|
# - 'corsheaders.middleware.CorsMiddleware'
|
|
# - 'django.contrib.auth.middleware.AuthenticationMiddleware'
|
|
# - 'django.contrib.messages.middleware.MessageMiddleware'
|
|
# - 'django.middleware.clickjacking.XFrameOptionsMiddleware'
|
|
# - 'InvenTree.middleware.AuthRequiredMiddleware' |