fix: update Dockerfile to combine collectstatic and app execution in CMD
All checks were successful
Build and Push Docker Image / build (push) Successful in 40s
All checks were successful
Build and Push Docker Image / build (push) Successful in 40s
- Refactored CMD to run `collectstatic` before starting the application - Replaced inline command with JSON array syntax for improved entrypoint handling
This commit is contained in:
@@ -7,12 +7,10 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN python manage.py collectstatic --noinput
|
||||
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=8000
|
||||
ENV LOG_LEVEL=info
|
||||
|
||||
EXPOSE ${PORT}
|
||||
|
||||
CMD uvicorn santehray.asgi:application --host ${HOST} --port ${PORT} --log-level ${LOG_LEVEL}
|
||||
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}"]
|
||||
|
||||
Reference in New Issue
Block a user