Refonte total
This commit is contained in:
+12
-7
@@ -1,7 +1,12 @@
|
||||
FROM python:3.9-slim
|
||||
WORKDIR /app
|
||||
COPY app/requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY app/ .
|
||||
EXPOSE 8000
|
||||
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
# Dockerfile.nginx (Frontend)
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copie vos fichiers statiques (index.html, etc.)
|
||||
COPY ./app /usr/share/nginx/html
|
||||
|
||||
# Force les droits Linux corrects pour Nginx (évite le 403 Forbidden)
|
||||
RUN chown -R nginx:nginx /usr/share/nginx/html && \
|
||||
chmod -R 755 /usr/share/nginx/html
|
||||
|
||||
# Nginx écoute par défaut sur le port 80 dans le conteneur
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user