mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-10 09:18:48 +00:00
Add entrypoint for running development worker
This commit is contained in:
parent
530f28ba95
commit
719b1775f2
@ -105,6 +105,8 @@ FROM base as dev
|
|||||||
WORKDIR ${INVENTREE_SRC_DIR}
|
WORKDIR ${INVENTREE_SRC_DIR}
|
||||||
|
|
||||||
COPY start_dev_server.sh ${INVENTREE_HOME}/start_dev_server.sh
|
COPY start_dev_server.sh ${INVENTREE_HOME}/start_dev_server.sh
|
||||||
|
COPY start_dev_worker.sh ${INVENTREE_HOME}/start_dev_worker.sh
|
||||||
RUN chmod 755 ${INVENTREE_HOME}/start_dev_server.sh
|
RUN chmod 755 ${INVENTREE_HOME}/start_dev_server.sh
|
||||||
|
RUN chmod 755 ${INVENTREE_HOME}/start_dev_worker.sh
|
||||||
|
|
||||||
CMD ["bash", "/home/inventree/start_dev_server.sh"]
|
CMD ["bash", "/home/inventree/start_dev_server.sh"]
|
||||||
|
@ -35,7 +35,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: dev
|
target: dev
|
||||||
entrypoint: invoke worker
|
entrypoint: /home/inventree/start_dev_worker.sh
|
||||||
|
depends_on:
|
||||||
- inventree-server
|
- inventree-server
|
||||||
volumes:
|
volumes:
|
||||||
# Ensure you specify the location of the 'src' directory at the end of this file
|
# Ensure you specify the location of the 'src' directory at the end of this file
|
||||||
|
19
docker/start_dev_worker.sh
Normal file
19
docker/start_dev_worker.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Starting InvenTree worker..."
|
||||||
|
|
||||||
|
cd $INVENTREE_SRC_DIR
|
||||||
|
|
||||||
|
# Activate virtual environment
|
||||||
|
source inventree-docker-dev/bin/activate
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
# Wait for the database to be ready
|
||||||
|
cd $INVENTREE_MNG_DIR
|
||||||
|
python manage.py wait_for_db
|
||||||
|
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
# Now we can launch the background worker process
|
||||||
|
python manage.py qcluster
|
Loading…
x
Reference in New Issue
Block a user