mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
[Docker] Fix broken production image (#6953)
* Check for presense of manage.py * Fix directory copying
This commit is contained in:
parent
d08a6ad18e
commit
6730cdbccf
1
.github/workflows/docker.yaml
vendored
1
.github/workflows/docker.yaml
vendored
@ -89,6 +89,7 @@ jobs:
|
|||||||
docker run --rm inventree-test invoke --list
|
docker run --rm inventree-test invoke --list
|
||||||
docker run --rm inventree-test gunicorn --version
|
docker run --rm inventree-test gunicorn --version
|
||||||
docker run --rm inventree-test pg_dump --version
|
docker run --rm inventree-test pg_dump --version
|
||||||
|
docker run --rm inventree-test test -f /home/inventree/src/backend/InvenTree/manage.py
|
||||||
- name: Build Docker Image
|
- name: Build Docker Image
|
||||||
# Build the development docker image (using docker-compose.yml)
|
# Build the development docker image (using docker-compose.yml)
|
||||||
run: docker compose --project-directory . -f contrib/container/dev-docker-compose.yml build --no-cache
|
run: docker compose --project-directory . -f contrib/container/dev-docker-compose.yml build --no-cache
|
||||||
|
@ -33,6 +33,8 @@ ENV INVENTREE_MEDIA_ROOT="${INVENTREE_DATA_DIR}/media"
|
|||||||
ENV INVENTREE_BACKUP_DIR="${INVENTREE_DATA_DIR}/backup"
|
ENV INVENTREE_BACKUP_DIR="${INVENTREE_DATA_DIR}/backup"
|
||||||
ENV INVENTREE_PLUGIN_DIR="${INVENTREE_DATA_DIR}/plugins"
|
ENV INVENTREE_PLUGIN_DIR="${INVENTREE_DATA_DIR}/plugins"
|
||||||
|
|
||||||
|
ENV INVENTREE_BACKEND_DIR="${INVENTREE_HOME}/src/backend"
|
||||||
|
|
||||||
# InvenTree configuration files
|
# InvenTree configuration files
|
||||||
ENV INVENTREE_CONFIG_FILE="${INVENTREE_DATA_DIR}/config.yaml"
|
ENV INVENTREE_CONFIG_FILE="${INVENTREE_DATA_DIR}/config.yaml"
|
||||||
ENV INVENTREE_SECRET_KEY_FILE="${INVENTREE_DATA_DIR}/secret_key.txt"
|
ENV INVENTREE_SECRET_KEY_FILE="${INVENTREE_DATA_DIR}/secret_key.txt"
|
||||||
@ -122,10 +124,9 @@ ENV INVENTREE_COMMIT_DATE="${commit_date}"
|
|||||||
ENV PATH=/root/.local/bin:$PATH
|
ENV PATH=/root/.local/bin:$PATH
|
||||||
COPY --from=prebuild /root/.local /root/.local
|
COPY --from=prebuild /root/.local /root/.local
|
||||||
|
|
||||||
ENV INVENTREE_BACKEND_DIR="${INVENTREE_HOME}"
|
|
||||||
|
|
||||||
# Copy source code
|
# Copy source code
|
||||||
COPY src/backend/InvenTree ./InvenTree
|
COPY src/backend/InvenTree ${INVENTREE_HOME}/src/backend/InvenTree
|
||||||
COPY --from=frontend ${INVENTREE_HOME}/src/backend/InvenTree/web/static/web ./src/backend/InvenTree/web/static/web
|
COPY --from=frontend ${INVENTREE_HOME}/src/backend/InvenTree/web/static/web ./src/backend/InvenTree/web/static/web
|
||||||
|
|
||||||
# Launch the production server
|
# Launch the production server
|
||||||
@ -133,8 +134,6 @@ CMD gunicorn -c ./gunicorn.conf.py InvenTree.wsgi -b 0.0.0.0:8000 --chdir ./Inve
|
|||||||
|
|
||||||
FROM inventree_base AS dev
|
FROM inventree_base AS dev
|
||||||
|
|
||||||
ENV INVENTREE_BACKEND_DIR="${INVENTREE_HOME}/src/backend"
|
|
||||||
|
|
||||||
# Vite server (for local frontend development)
|
# Vite server (for local frontend development)
|
||||||
EXPOSE 5173
|
EXPOSE 5173
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user