mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 03:56:43 +00:00
Fix entrypoint / cmd for production server
This commit is contained in:
parent
79d7a9f922
commit
2095d66677
@ -36,7 +36,7 @@ def schedule_task(taskname, **kwargs):
|
|||||||
# If this task is already scheduled, don't schedule it again
|
# If this task is already scheduled, don't schedule it again
|
||||||
# Instead, update the scheduling parameters
|
# Instead, update the scheduling parameters
|
||||||
if Schedule.objects.filter(func=taskname).exists():
|
if Schedule.objects.filter(func=taskname).exists():
|
||||||
logger.info(f"Scheduled task '{taskname}' already exists - updating!")
|
logger.debug(f"Scheduled task '{taskname}' already exists - updating!")
|
||||||
|
|
||||||
Schedule.objects.filter(func=taskname).update(**kwargs)
|
Schedule.objects.filter(func=taskname).update(**kwargs)
|
||||||
else:
|
else:
|
||||||
|
@ -87,19 +87,20 @@ RUN if [ -n "${INVENTREE_GIT_TAG}" ] ; then cd ${INVENTREE_HOME} && git fetch --
|
|||||||
|
|
||||||
RUN chown -R inventree:inventreegroup ${INVENTREE_HOME}/*
|
RUN chown -R inventree:inventreegroup ${INVENTREE_HOME}/*
|
||||||
|
|
||||||
WORKDIR ${INVENTREE_HOME}
|
|
||||||
|
|
||||||
# Drop to the inventree user
|
# Drop to the inventree user
|
||||||
USER inventree
|
USER inventree
|
||||||
|
|
||||||
# Install InvenTree packages
|
# Install InvenTree packages
|
||||||
RUN pip3 install --no-cache-dir --disable-pip-version-check -r ${INVENTREE_HOME}/requirements.txt
|
RUN pip3 install --no-cache-dir --disable-pip-version-check -r ${INVENTREE_HOME}/requirements.txt
|
||||||
|
|
||||||
|
# Need to be running from within this directory
|
||||||
|
WORKDIR ${INVENTREE_MNG_DIR}
|
||||||
|
|
||||||
# Server init entrypoint
|
# Server init entrypoint
|
||||||
ENTRYPOINT ["/bin/bash", "./docker/init.sh"]
|
ENTRYPOINT ["/bin/bash", "../docker/init.sh"]
|
||||||
|
|
||||||
# Launch the production server
|
# Launch the production server
|
||||||
CMD ["gunicorn -c ./docker/gunicorn.conf.py -b ${INVENTREE_WEB_ADDR}:${INVENTREE_WEB_PORT} InvenTree.wsgi"]
|
CMD ["gunicorn", "-c", "../docker/gunicorn.conf.py", "InvenTree.wsgi", "-b", "${INVENTREE_WEB_ADDR}:${INVENTREE_WEB_PORT}", "--pythonpath", "${INVENTREE_MNG_DIR}"]
|
||||||
|
|
||||||
FROM base as dev
|
FROM base as dev
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user