28 lines
782 B
Docker
28 lines
782 B
Docker
FROM python:3.11-slim
|
|
|
|
LABEL org.opencontainers.image.title="YRTV"
|
|
LABEL org.opencontainers.image.description="Private CS2 team analytics by Superjacky6"
|
|
LABEL org.opencontainers.image.authors="Superjacky6, jacky, jk, yr, jacky0987"
|
|
LABEL org.opencontainers.image.version="2.0.0-beta"
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV YRTV_DATA_DIR=/data
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
RUN chmod +x /app/docker/entrypoint.sh \
|
|
&& mkdir -p /data
|
|
|
|
VOLUME ["/data"]
|
|
EXPOSE 5000
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:5000/healthz', timeout=3)"
|
|
|
|
ENTRYPOINT ["/app/docker/entrypoint.sh"]
|