Initial commit

This commit is contained in:
minguezsanzjuanjose
2026-04-11 03:31:05 +02:00
commit 1e78ad3a40
15 changed files with 244 additions and 0 deletions

29
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"]