SMW-Upload/Dockerfile

23 lines
528 B
Docker

FROM python:3.11-slim
WORKDIR /app
RUN pip install --upgrade pip
COPY requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --upgrade gunicorn
COPY . /app
# Collect static files for WhiteNoise
RUN python manage.py collectstatic --noinput
# Make entrypoint script executable
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["gunicorn", "seduttomachineworks_project.wsgi:application", "--bind", "0.0.0.0:8000"]