You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
908 B
29 lines
908 B
|
2 weeks ago
|
FROM python:3.11-slim
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||
|
|
ENV PYTHONUNBUFFERED=1
|
||
|
|
ENV BUFFER_DB_PATH=/app/data/buffer.db
|
||
|
|
ENV BUFFER_HOST=0.0.0.0
|
||
|
|
ENV BUFFER_PORT=8600
|
||
|
|
|
||
|
|
RUN rm -f /etc/apt/sources.list.d/debian.sources && \
|
||
|
|
echo "deb http://mirrors.aliyun.com/debian trixie main" > /etc/apt/sources.list && \
|
||
|
|
echo "deb http://mirrors.aliyun.com/debian trixie-updates main" >> /etc/apt/sources.list && \
|
||
|
|
echo "deb http://mirrors.aliyun.com/debian-security trixie-security main" >> /etc/apt/sources.list && \
|
||
|
|
apt-get update && \
|
||
|
|
apt-get install -y --no-install-recommends gcc && \
|
||
|
|
rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
COPY requirements.txt .
|
||
|
|
RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
||
|
|
|
||
|
|
COPY . .
|
||
|
|
|
||
|
|
RUN mkdir -p /app/data
|
||
|
|
|
||
|
|
EXPOSE 8600
|
||
|
|
|
||
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8600"]
|