Migrate maps to @geoscene/core, polish monitoring/alerts UX, fix timeline basemap flicker and district alert regions, and ship compose/nginx Docker deploy assets with CBPOA_ROOT data mounts. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
707 B
Docker
27 lines
707 B
Docker
FROM python:3.11-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libpq-dev curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN groupadd --gid 1000 appgroup && \
|
|
useradd --uid 1000 --gid appgroup --shell /bin/bash --create-home appuser
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --chown=appuser:appgroup requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt \
|
|
-i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
|
COPY --chown=appuser:appgroup . .
|
|
|
|
USER appuser
|
|
|
|
ENV CBPOA_ROOT=/data
|
|
EXPOSE 8000
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
|
|
CMD curl -f http://localhost:8000/docs || exit 1
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|