26 lines
509 B
Docker
26 lines
509 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Installer les dépendances système
|
|
RUN apt-get update && apt-get install -y \
|
|
gcc \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copier les fichiers de dépendances
|
|
COPY requirements.txt .
|
|
|
|
# Installer les dépendances Python
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copier le code de l'application
|
|
COPY . .
|
|
|
|
# Exposer le port
|
|
EXPOSE 3000
|
|
|
|
# Commande pour démarrer l'application
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "3000"]
|
|
|