Files
santeh-ray/Dockerfile
Azimkin 438d547fb4
All checks were successful
Build and Push Docker Image / build (push) Successful in 40s
fix: update Dockerfile to combine collectstatic and app execution in CMD
- Refactored CMD to run `collectstatic` before starting the application
- Replaced inline command with JSON array syntax for improved entrypoint handling
2026-05-17 10:30:27 +02:00

17 lines
370 B
Docker

FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
ENV HOST=0.0.0.0
ENV PORT=8000
ENV LOG_LEVEL=info
EXPOSE ${PORT}
CMD ["sh", "-c", "python manage.py collectstatic --noinput && exec uvicorn santehray.asgi:application --host ${HOST:-0.0.0.0} --port ${PORT:-8000} --log-level ${LOG_LEVEL:-info}"]