mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
docker-mode switch in settings and tags
This commit is contained in:
parent
16b7d6c34d
commit
b2a912c770
@ -87,6 +87,11 @@ DEBUG = _is_true(get_setting(
|
|||||||
CONFIG.get('debug', True)
|
CONFIG.get('debug', True)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
DOCKER = _is_true(get_setting(
|
||||||
|
'INVENTREE_DOCKER',
|
||||||
|
False
|
||||||
|
))
|
||||||
|
|
||||||
# Configure logging settings
|
# Configure logging settings
|
||||||
log_level = get_setting(
|
log_level = get_setting(
|
||||||
'INVENTREE_LOG_LEVEL',
|
'INVENTREE_LOG_LEVEL',
|
||||||
|
@ -81,6 +81,13 @@ def inventree_in_debug_mode(*args, **kwargs):
|
|||||||
return djangosettings.DEBUG
|
return djangosettings.DEBUG
|
||||||
|
|
||||||
|
|
||||||
|
@register.simple_tag()
|
||||||
|
def inventree_docker_mode(*args, **kwargs):
|
||||||
|
""" Return True if the server is running as a Docker image """
|
||||||
|
|
||||||
|
return djangosettings.DOCKER
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag()
|
@register.simple_tag()
|
||||||
def inventree_db_engine(*args, **kwargs):
|
def inventree_db_engine(*args, **kwargs):
|
||||||
""" Return the InvenTree database backend e.g. 'postgresql' """
|
""" Return the InvenTree database backend e.g. 'postgresql' """
|
||||||
|
@ -14,6 +14,7 @@ ENV INVENTREE_REPO="${repository}"
|
|||||||
ENV INVENTREE_BRANCH="${branch}"
|
ENV INVENTREE_BRANCH="${branch}"
|
||||||
|
|
||||||
ENV INVENTREE_LOG_LEVEL="INFO"
|
ENV INVENTREE_LOG_LEVEL="INFO"
|
||||||
|
ENV INVENTREE_DOCKER="true"
|
||||||
|
|
||||||
# InvenTree paths
|
# InvenTree paths
|
||||||
ENV INVENTREE_SRC_DIR="${INVENTREE_HOME}/src"
|
ENV INVENTREE_SRC_DIR="${INVENTREE_HOME}/src"
|
||||||
|
Loading…
Reference in New Issue
Block a user