refactor code structure and remove unused

This commit is contained in:
hibobmaster 2023-08-05 23:11:23 +08:00
commit 2ead99a06b
Signed by: bobmaster
SSH key fingerprint: SHA256:5ZYgd8fg+PcNZNy4SzcSKu5JtqZyBF8kUhY7/k2viDk
20 changed files with 1004 additions and 1515 deletions

View file

@ -1,16 +1,16 @@
FROM python:3.11-alpine as base
FROM base as builder
# RUN sed -i 's|v3\.\d*|edge|' /etc/apk/repositories
RUN apk update && apk add --no-cache gcc musl-dev libffi-dev git
COPY requirements.txt .
RUN pip install -U pip setuptools wheel && pip install --user -r ./requirements.txt && rm ./requirements.txt
FROM base as runner
RUN apk update && apk add --no-cache libffi-dev
COPY --from=builder /root/.local /usr/local
COPY . /app
FROM runner
WORKDIR /app
CMD ["python", "main.py"]
FROM python:3.11-alpine as base
FROM base as builder
# RUN sed -i 's|v3\.\d*|edge|' /etc/apk/repositories
RUN apk update && apk add --no-cache gcc musl-dev libffi-dev git
COPY requirements.txt .
RUN pip install -U pip setuptools wheel && pip install --user -r ./requirements.txt && rm ./requirements.txt
FROM base as runner
RUN apk update && apk add --no-cache libffi-dev
COPY --from=builder /root/.local /usr/local
COPY . /app
FROM runner
WORKDIR /app
CMD ["python", "src/main.py"]