Gros refactoring
This commit is contained in:
parent
6008aa68f6
commit
4a6bfc951f
368 changed files with 22503 additions and 3 deletions
55
frontend/Dockerfile
Normal file
55
frontend/Dockerfile
Normal file
|
@ -0,0 +1,55 @@
|
|||
# Utiliser l'image Python 3.13 slim officielle comme base
|
||||
FROM python:3.13-slim
|
||||
|
||||
# Définir des variables d'environnement
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
POETRY_VERSION=1.5.1 \
|
||||
POETRY_HOME="/opt/poetry" \
|
||||
POETRY_VIRTUALENVS_IN_PROJECT=true \
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
PYSETUP_PATH="/opt/pysetup" \
|
||||
VENV_PATH="/opt/pysetup/.venv"
|
||||
|
||||
# Définir le répertoire de travail dans le conteneur
|
||||
WORKDIR /app
|
||||
|
||||
# Installer les dépendances système nécessaires
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Installer Poetry
|
||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
ENV PATH="${POETRY_HOME}/bin:${PATH}"
|
||||
|
||||
# Copier les fichiers de configuration de Poetry
|
||||
COPY pyproject.toml poetry.lock* ./
|
||||
|
||||
# Installer les dépendances du projet
|
||||
RUN poetry config virtualenvs.create false \
|
||||
&& poetry install --no-dev --no-interaction --no-ansi
|
||||
|
||||
# Copier le code de l'application
|
||||
COPY . .
|
||||
|
||||
# Exposer le port sur lequel Streamlit s'exécutera
|
||||
EXPOSE 8051
|
||||
|
||||
# Définir l'entrypoint pour exécuter l'application
|
||||
ENTRYPOINT ["poetry", "run", "streamlit", "run"]
|
||||
|
||||
# Définir la commande par défaut avec les options optimisées pour Streamlit
|
||||
CMD ["main.py", \
|
||||
"--server.port=8051", \
|
||||
"--server.address=0.0.0.0", \
|
||||
"--server.headless=true", \
|
||||
"--server.enableCORS=false", \
|
||||
"--server.enableXsrfProtection=false", \
|
||||
"--server.maxUploadSize=1028", \
|
||||
"--browser.serverAddress=0.0.0.0", \
|
||||
"--browser.gatherUsageStats=false", \
|
||||
"--logger.level=error", \
|
||||
"--client.showErrorDetails=false"]
|
Loading…
Add table
Add a link
Reference in a new issue