mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 01:55:39 +00:00
All "development" related stuff now goes under ./dev
- Update dev-config.env - Update docker-compose.dev.yml - Development target of Dockerfile no longer creates any folders - Update entry point scripts
This commit is contained in:
@ -16,21 +16,22 @@ if test -f "$INVENTREE_CONFIG_FILE"; then
|
||||
echo "$INVENTREE_CONFIG_FILE exists - skipping"
|
||||
else
|
||||
echo "Copying config file to $INVENTREE_CONFIG_FILE"
|
||||
cp $INVENTREE_SRC_DIR/InvenTree/config_template.yaml $INVENTREE_CONFIG_FILE
|
||||
cp $INVENTREE_HOME/InvenTree/config_template.yaml $INVENTREE_CONFIG_FILE
|
||||
fi
|
||||
|
||||
# Setup a virtual environment
|
||||
python3 -m venv inventree-docker-dev
|
||||
# Setup a virtual environment (within the "dev" directory)
|
||||
python3 -m venv ./dev/env
|
||||
|
||||
source inventree-docker-dev/bin/activate
|
||||
# Activate the virtual environment
|
||||
source ./dev/env/bin/activate
|
||||
|
||||
echo "Installing required packages..."
|
||||
pip install --no-cache-dir -U -r ${INVENTREE_SRC_DIR}/requirements.txt
|
||||
pip install --no-cache-dir -U -r ${INVENTREE_HOME}/requirements.txt
|
||||
|
||||
echo "Starting InvenTree server..."
|
||||
|
||||
# Wait for the database to be ready
|
||||
cd $INVENTREE_MNG_DIR
|
||||
cd ${INVENTREE_HOME}/InvenTree
|
||||
python manage.py wait_for_db
|
||||
|
||||
sleep 10
|
||||
@ -45,4 +46,4 @@ python manage.py migrate --run-syncdb || exit 1
|
||||
python manage.py clearsessions || exit 1
|
||||
|
||||
# Launch a development server
|
||||
python manage.py runserver 0.0.0.0:$INVENTREE_WEB_PORT
|
||||
python manage.py runserver ${INVENTREE_WEB_ADDR}:${INVENTREE_WEB_PORT}
|
||||
|
Reference in New Issue
Block a user