mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 01:55:39 +00:00
Improvements to development docker-compose script
- Python packages are installed in a virtual environment within the src dir - This prevents a LONG installation process each time the docker image is rebuilt
This commit is contained in:
@ -86,11 +86,9 @@ COPY gunicorn.conf.py ${INVENTREE_HOME}/gunicorn.conf.py
|
||||
|
||||
# Copy startup scripts
|
||||
COPY start_prod_server.sh ${INVENTREE_SRC_DIR}/start_prod_server.sh
|
||||
COPY start_dev_server.sh ${INVENTREE_SRC_DIR}/start_dev_server.sh
|
||||
COPY start_worker.sh ${INVENTREE_SRC_DIR}/start_worker.sh
|
||||
|
||||
RUN chmod 755 ${INVENTREE_SRC_DIR}/start_prod_server.sh
|
||||
RUN chmod 755 ${INVENTREE_SRC_DIR}/start_dev_server.sh
|
||||
RUN chmod 755 ${INVENTREE_SRC_DIR}/start_worker.sh
|
||||
|
||||
# exec commands should be executed from the "src" directory
|
||||
@ -100,7 +98,13 @@ WORKDIR ${INVENTREE_SRC_DIR}
|
||||
CMD ["bash", "./start_prod_server.sh"]
|
||||
|
||||
FROM base as dev
|
||||
|
||||
# The development image requires the source code to be mounted to /home/inventree/src/
|
||||
# So from here, we don't actually "do" anything
|
||||
|
||||
WORKDIR ${INVENTREE_SRC_DIR}
|
||||
|
||||
COPY start_dev_server.sh ${INVENTREE_HOME}/start_dev_server.sh
|
||||
RUN chmod 755 ${INVENTREE_HOME}/start_dev_server.sh
|
||||
|
||||
CMD ["bash", "/home/inventree/start_dev_server.sh"]
|
||||
|
Reference in New Issue
Block a user