Search-Goods/Dockerfile

16 lines
503 B
Docker

FROM python:3.11-slim
WORKDIR /app
RUN mkdir -p /etc
RUN echo "[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple\n" > /etc/pip.conf
ENV PIP_INDEX_URL=https://mirrors.cloud.tencent.com/pypi/simple \
PIP_DEFAULT_TIMEOUT=120
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app app
COPY static static
COPY README.md README.md
ENV PORT=57777
RUN mkdir -p /app/data
EXPOSE 57777
CMD ["sh","-c","uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-57777}"]