2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

Update directory structure to match docker config

This commit is contained in:
Oliver Walters 2021-04-10 22:08:36 +10:00
parent 2f1db486a0
commit 91b6f98f95
3 changed files with 8 additions and 6 deletions

View File

@ -182,7 +182,7 @@ STATIC_URL = '/static/'
STATIC_ROOT = os.path.abspath( STATIC_ROOT = os.path.abspath(
get_setting( get_setting(
'INVENTREE_STATIC_ROOT', 'INVENTREE_STATIC_ROOT',
CONFIG.get('static_root', os.path.join(BASE_DIR, 'static')) CONFIG.get('static_root', '/home/inventree/static')
) )
) )
@ -200,7 +200,7 @@ MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.abspath( MEDIA_ROOT = os.path.abspath(
get_setting( get_setting(
'INVENTREE_MEDIA_ROOT', 'INVENTREE_MEDIA_ROOT',
CONFIG.get('media_root', os.path.join(BASE_DIR, 'media')) CONFIG.get('media_root', '/home/inventree/data/media')
) )
) )

View File

@ -95,9 +95,9 @@ cors:
# - https://sub.example.com # - https://sub.example.com
# MEDIA_ROOT is the local filesystem location for storing uploaded files # MEDIA_ROOT is the local filesystem location for storing uploaded files
# By default, it is stored under /home/inventree # By default, it is stored under /home/inventree/data/media
# Use environment variable INVENTREE_MEDIA_ROOT # Use environment variable INVENTREE_MEDIA_ROOT
media_root: '/home/inventree/media' media_root: '/home/inventree/data/media'
# STATIC_ROOT is the local filesystem location for storing static files # STATIC_ROOT is the local filesystem location for storing static files
# By default, it is stored under /home/inventree # By default, it is stored under /home/inventree
@ -116,7 +116,7 @@ static_root: '/home/inventree/static'
# Set the backup_dir parameter to store backup files in a specific location # Set the backup_dir parameter to store backup files in a specific location
# If unspecified, the local user's temp directory will be used # If unspecified, the local user's temp directory will be used
# Use environment variable INVENTREE_BACKUP_DIR # Use environment variable INVENTREE_BACKUP_DIR
backup_dir: '/home/inventree/backup/' backup_dir: '/home/inventree/data/backup/'
# Permit custom authentication backends # Permit custom authentication backends
#authentication_backends: #authentication_backends:

View File

@ -19,7 +19,7 @@ ENV INVENTREE_LOG_LEVEL="INFO"
ENV INVENTREE_SRC_DIR="${INVENTREE_HOME}/src" ENV INVENTREE_SRC_DIR="${INVENTREE_HOME}/src"
ENV INVENTREE_MNG_DIR="${INVENTREE_SRC_DIR}/InvenTree" ENV INVENTREE_MNG_DIR="${INVENTREE_SRC_DIR}/InvenTree"
ENV INVENTREE_DATA_DIR="${INVENTREE_HOME}/data" ENV INVENTREE_DATA_DIR="${INVENTREE_HOME}/data"
ENV INVENTREE_STATIC_ROOT="${INVENTREE_DATA_DIR}/static" ENV INVENTREE_STATIC_ROOT="${INVENTREE_HOME}/static"
ENV INVENTREE_MEDIA_ROOT="${INVENTREE_DATA_DIR}/media" ENV INVENTREE_MEDIA_ROOT="${INVENTREE_DATA_DIR}/media"
ENV INVENTREE_BACKUP_DIR="${INVENTREE_DATA_DIR}/backup" ENV INVENTREE_BACKUP_DIR="${INVENTREE_DATA_DIR}/backup"
@ -48,6 +48,8 @@ LABEL org.label-schema.schema-version="1.0" \
RUN addgroup -S inventreegroup && adduser -S inventree -G inventreegroup RUN addgroup -S inventreegroup && adduser -S inventree -G inventreegroup
WORKDIR ${INVENTREE_HOME} WORKDIR ${INVENTREE_HOME}
RUN mkdir ${INVENTREE_STATIC_ROOT}
# Install required system packages # Install required system packages
RUN apk add --no-cache git make bash \ RUN apk add --no-cache git make bash \
gcc libgcc g++ libstdc++ \ gcc libgcc g++ libstdc++ \