feat: remove useless file
This commit is contained in:
28
dockerfile
28
dockerfile
@@ -1,10 +1,24 @@
|
||||
FROM git.mamahaha.work/sangge/tpre:base
|
||||
|
||||
COPY src /app
|
||||
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
|
||||
FROM python:3.13-slim AS base
|
||||
WORKDIR /app
|
||||
COPY ./pyproject.toml /app/
|
||||
COPY lib/* /usr/local/lib/
|
||||
RUN ldconfig && \
|
||||
pip install -i https://git.mamahaha.work/api/packages/sangge/pypi/simple/ ecc-rs==0.1.2 --no-cache-dir
|
||||
|
||||
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# Development stage
|
||||
FROM base AS dev
|
||||
RUN pip install -e ".[dev]" -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir
|
||||
|
||||
# Test stage
|
||||
FROM base AS test
|
||||
COPY ./tests /app/tests
|
||||
RUN pip install -e ".[test]" -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir
|
||||
ENTRYPOINT ["pytest", "/app/tests"]
|
||||
CMD ["-xvs"]
|
||||
|
||||
# Deployment stage
|
||||
FROM base AS deploy
|
||||
WORKDIR /app
|
||||
COPY --from=base /usr/local/lib/* /usr/local/lib/
|
||||
COPY src /app
|
||||
RUN ldconfig
|
||||
|
Reference in New Issue
Block a user