b43b888f53
- README.md: guía de instalación (venv, .env, migraciones, gunicorn) y notas de producción/seguridad - Dockerfile: imagen Python 3.14 con deps de sistema para mysqlclient/Pillow - docker-compose.yml: servicios web (Django+gunicorn) y db (MySQL 8.4) con las 4 BBDD - docker/entrypoint.sh: espera a MySQL, migra, collectstatic y arranca gunicorn - docker/mysql-init.sql: crea django_wow + bases acore_* - .dockerignore y gunicorn en requirements Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33 lines
881 B
Docker
33 lines
881 B
Docker
# Nova WoW - imagen del portal Django
|
|
FROM python:3.14-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
# Dependencias de sistema para mysqlclient (compilación + runtime) y Pillow
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
pkg-config \
|
|
default-libmysqlclient-dev \
|
|
libgmp-dev libmpfr-dev libmpc-dev \
|
|
libjpeg-dev zlib1g-dev \
|
|
netcat-openbsd \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Instalar dependencias Python primero (mejor cache)
|
|
COPY requirements.txt .
|
|
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copiar el código
|
|
COPY . .
|
|
|
|
# Entrypoint
|
|
RUN chmod +x /app/docker/entrypoint.sh
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["/app/docker/entrypoint.sh"]
|
|
CMD ["gunicorn", "novawow.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "4"]
|