mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Allow setting Khoj app version during docker build via build-args
This will allow troubleshooting by getting the actual khoj version being used. Previously it was always set to a static 0.0.0 version Command to build Khoj docker image with dynamically set current app version: `docker-compose build server --build-arg VERSION=$(pipx run hatch version)'
This commit is contained in:
parent
70607cbbbb
commit
d3d47dce0b
2 changed files with 4 additions and 2 deletions
|
@ -10,7 +10,8 @@ WORKDIR /app
|
||||||
# Install Application
|
# Install Application
|
||||||
COPY pyproject.toml .
|
COPY pyproject.toml .
|
||||||
COPY README.md .
|
COPY README.md .
|
||||||
RUN sed -i 's/dynamic = \["version"\]/version = "0.0.0"/' pyproject.toml && \
|
ARG VERSION=0.0.0
|
||||||
|
RUN sed -i "s/dynamic = \\[\"version\"\\]/version = \"$VERSION\"/" pyproject.toml && \
|
||||||
pip install --no-cache-dir .
|
pip install --no-cache-dir .
|
||||||
|
|
||||||
# Copy Source Code
|
# Copy Source Code
|
||||||
|
|
|
@ -11,7 +11,8 @@ WORKDIR /app
|
||||||
# Install Application
|
# Install Application
|
||||||
COPY pyproject.toml .
|
COPY pyproject.toml .
|
||||||
COPY README.md .
|
COPY README.md .
|
||||||
RUN sed -i 's/dynamic = \["version"\]/version = "0.0.0"/' pyproject.toml && \
|
ARG VERSION=0.0.0
|
||||||
|
RUN sed -i "s/dynamic = \\[\"version\"\\]/version = \"$VERSION\"/" pyproject.toml && \
|
||||||
TMPDIR=/home/cache/ pip install --cache-dir=/home/cache/ -e .
|
TMPDIR=/home/cache/ pip install --cache-dir=/home/cache/ -e .
|
||||||
|
|
||||||
# Copy Source Code
|
# Copy Source Code
|
||||||
|
|
Loading…
Reference in a new issue