cambio estructura de datos fix

This commit is contained in:
juanjo
2026-04-11 13:20:54 +02:00
parent c5f1b4e131
commit 69a35ecf58
5 changed files with 14 additions and 22 deletions

29
deployments/Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# Usamos una imagen ligera de Python
FROM python:3.12-slim
# Evitar que Python genere archivos .pyc y que el buffer se sature
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Directorio de trabajo
WORKDIR /app
# Instalar dependencias del sistema necesarias
RUN apt-get update && apt-get install -y \
libpq-dev \
gcc \
gettext \
&& rm -rf /var/lib/apt/lists/*
# Instalar dependencias de Python
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
# Copiar el resto del código
COPY . /app/
# Exponer el puerto de Django
EXPOSE 8000
# Comando por defecto para arrancar (usaremos manage.py en dev y gunicorn en prod)
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]