- django.registry.Dockerfile: imagen autocontenida (codigo + entrypoint) - docker/entrypoint.sh: migrate + collectstatic + gunicorn; con args ejecuta ese comando - scripts/build-push-image.sh: build y push a gitea.onecluster.org/oneteam/don_confiao_backend (latest + git sha)
20 lines
583 B
Docker
20 lines
583 B
Docker
# Imagen de produccion del backend para publicar en el registry de Gitea.
|
|
# Autocontenida: incluye el codigo y un entrypoint que aplica migraciones,
|
|
# colecta estaticos y arranca gunicorn. Coolify solo hace pull y define env vars.
|
|
FROM python:3.12-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app/
|
|
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY tienda_ilusion/ /app/
|
|
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |