diff --git a/docker/Dockerfile b/docker/Dockerfile index 55a89210fe..b272683322 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -110,7 +110,8 @@ RUN pip3 install --user --no-cache-dir --disable-pip-version-check -r ${INVENTRE WORKDIR ${INVENTREE_MNG_DIR} # Server init entrypoint -ENTRYPOINT ["/bin/bash", "../docker/init.sh"] +COPY init.sh ${INVENTREE_HOME}/init.sh +ENTRYPOINT ["/bin/bash", "${INVENTREE_HOME}/init.sh"] # Launch the production server # TODO: Work out why environment variables cannot be interpolated in this command @@ -137,7 +138,6 @@ ENV INVENTREE_CONFIG_FILE="${INVENTREE_DEV_DIR}/config.yaml" ENV INVENTREE_SECRET_KEY_FILE="${INVENTREE_DEV_DIR}/secret_key.txt" ENV INVENTREE_PLUGIN_FILE="${INVENTREE_DEV_DIR}/plugins.txt" - WORKDIR ${INVENTREE_HOME} # Entrypoint ensures that we are running in the python virtual environment diff --git a/docker/init.sh b/docker/init.sh index 793661dc9f..088dd68e89 100644 --- a/docker/init.sh +++ b/docker/init.sh @@ -33,7 +33,7 @@ if [[ -n "$INVENTREE_PY_ENV" ]]; then source ${INVENTREE_PY_ENV}/bin/activate # Note: Python packages will have to be installed on first run - # e.g docker-compose -f docker-compose.dev.yml run inventree-dev-server invoke install + # e.g docker-compose run inventree-dev-server invoke update fi cd ${INVENTREE_HOME}