2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-13 06:01:35 +00:00

fix: The function should return early when in Docker environment (#10178)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
Daniil Chudo
2025-08-18 05:16:28 +04:00
committed by GitHub
parent 81565c0faa
commit 669a155467
2 changed files with 4 additions and 1 deletions

View File

@@ -137,6 +137,9 @@ COPY src/backend/InvenTree ${INVENTREE_BACKEND_DIR}/InvenTree
COPY src/backend/requirements.txt ${INVENTREE_BACKEND_DIR}/requirements.txt COPY src/backend/requirements.txt ${INVENTREE_BACKEND_DIR}/requirements.txt
COPY --from=frontend ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web COPY --from=frontend ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web
# Fix invoke command path for InvenTree environment check
RUN ln -sf /root/.local/bin/invoke /bin/invoke
# Launch the production server # Launch the production server
CMD gunicorn -c ./gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:8000 --chdir ${INVENTREE_BACKEND_DIR}/InvenTree CMD gunicorn -c ./gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:8000 --chdir ${INVENTREE_BACKEND_DIR}/InvenTree

View File

@@ -223,7 +223,7 @@ def envcheck_invoke_cmd():
correct_cmd: Optional[str] = None correct_cmd: Optional[str] = None
if is_rtd_environment() or is_docker_environment() or is_devcontainer_environment(): if is_rtd_environment() or is_docker_environment() or is_devcontainer_environment():
pass return # Skip invoke command check for Docker/RTD/DevContainer environments
elif is_pkg_installer(load_content=True) and not is_pkg_installer_by_path(): elif is_pkg_installer(load_content=True) and not is_pkg_installer_by_path():
correct_cmd = 'inventree run invoke' correct_cmd = 'inventree run invoke'
else: else: