feat: improve campus bike discovery and add independent live preview
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
FROM python:3.11-slim
|
||||
ENV TZ=Asia/Shanghai PYTHONUNBUFFERED=1 XBNIU_PREVIEW=1 XBNIU_DB_PATH=/data/preview.db PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt gunicorn==23.0.0
|
||||
COPY . .
|
||||
RUN mkdir -p /data
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=20s --timeout=5s --start-period=20s --retries=3 CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/healthz', timeout=3)"
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--workers", "1", "--threads", "4", "--timeout", "60", "preview_server:app"]
|
||||
Reference in New Issue
Block a user