Skip to content

Commit cb88c95

Browse files
committed
update dockerfile
1 parent 26ee7ba commit cb88c95

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,6 @@ jobs:
295295
echo ${{ needs.version-info.outputs.version }}
296296
echo "VERSION='${{ needs.version-info.outputs.version }}'" >> module/__version__.py
297297
298-
- name: Copy requirements.txt
299-
working-directory: ./backend
300-
run: cp requirements.txt src/requirements.txt
301298
302299
- name: Zip app
303300
run: |

Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,35 @@ ENV LANG="C.UTF-8" \
1010

1111
WORKDIR /app
1212

13-
COPY backend/requirements.txt .
13+
# Copy Python project files
14+
COPY backend/pyproject.toml backend/uv.lock ./
15+
1416
RUN set -ex && \
1517
apk add --no-cache \
1618
bash \
1719
busybox-suid \
1820
python3 \
1921
py3-aiohttp \
2022
py3-bcrypt \
21-
py3-pip \
23+
curl \
2224
su-exec \
2325
shadow \
2426
tini \
2527
openssl \
2628
tzdata && \
27-
python3 -m pip install --no-cache-dir --upgrade pip && \
28-
sed -i '/bcrypt/d' requirements.txt && \
29-
pip install --no-cache-dir -r requirements.txt && \
29+
# Install uv
30+
curl -LsSf https://astral.sh/uv/install.sh | sh && \
31+
. $HOME/.cargo/env && \
32+
# Install dependencies using uv
33+
uv sync --frozen --no-dev && \
3034
# Add user
3135
mkdir -p /home/ab && \
3236
addgroup -S ab -g 911 && \
3337
adduser -S ab -G ab -h /home/ab -s /sbin/nologin -u 911 && \
3438
# Clear
3539
rm -rf \
3640
/root/.cache \
41+
/root/.cargo \
3742
/tmp/*
3843

3944
COPY --chmod=755 backend/src/. .

0 commit comments

Comments
 (0)