initial version
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Evite les fichiers .pyc
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Affiche directement les logs
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Dépendances système
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
# Création du dossier media
|
||||
RUN mkdir -p /app/media
|
||||
|
||||
# Script de démarrage
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user