Skip to content

Commit 669a155

Browse files
daniil4udoSchrodingersGatmatmair
authored
fix: The function should return early when in Docker environment (inventree#10178)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com> Co-authored-by: Matthias Mair <code@mjmair.com>
1 parent 81565c0 commit 669a155

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

contrib/container/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ COPY src/backend/InvenTree ${INVENTREE_BACKEND_DIR}/InvenTree
137137
COPY src/backend/requirements.txt ${INVENTREE_BACKEND_DIR}/requirements.txt
138138
COPY --from=frontend ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web ${INVENTREE_BACKEND_DIR}/InvenTree/web/static/web
139139

140+
# Fix invoke command path for InvenTree environment check
141+
RUN ln -sf /root/.local/bin/invoke /bin/invoke
142+
140143
# Launch the production server
141144
CMD gunicorn -c ./gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:8000 --chdir ${INVENTREE_BACKEND_DIR}/InvenTree
142145

tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def envcheck_invoke_cmd():
223223

224224
correct_cmd: Optional[str] = None
225225
if is_rtd_environment() or is_docker_environment() or is_devcontainer_environment():
226-
pass
226+
return # Skip invoke command check for Docker/RTD/DevContainer environments
227227
elif is_pkg_installer(load_content=True) and not is_pkg_installer_by_path():
228228
correct_cmd = 'inventree run invoke'
229229
else:

0 commit comments

Comments
 (0)