35 lines
1.1 KiB
Docker
35 lines
1.1 KiB
Docker
FROM python:3.13-slim
|
|
|
|
LABEL authors="tebarius"
|
|
LABEL description="tebarius Mysteryhelfer web"
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends curl \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
COPY ./app /app
|
|
|
|
RUN python -m pip install --upgrade pip \
|
|
&& pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
# ein bisschen Patchen um auch beim Bookmarken oder Versenden der Webadresse per Messenger den richtigen Titel und das
|
|
# richtige Favicon zu verwenden/sehen
|
|
COPY ./app/images/favicon.ico /usr/local/lib/python3.13/site-packages/streamlit/static/favicon.ico
|
|
RUN sed -i -e 's|favicon\.png|favicon.ico|' \
|
|
-e 's|<title>.*</title>|<title>tebarius Mysteryhelfer (web)</title>|' \
|
|
/usr/local/lib/python3.13/site-packages/streamlit/static/index.html \
|
|
&& useradd -m -u 1000 myst \
|
|
&& chown -R myst:myst /app
|
|
USER myst
|
|
|
|
EXPOSE 8501
|
|
|
|
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
|
|
|
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|