FROM python:3.10

WORKDIR /app


# RUN useradd -ms /bin/bash dessdie

# RUN useradd -ms /bin/bash dessdie \
#     && chown -R dessdie:dessdie /app \
#     && chmod -R 777 /app

RUN chmod -R 777 /app

# USER dessdie


COPY . /app



RUN python -m pip install --upgrade pip

RUN pip install --no-cache-dir -r new.txt 
# RUN pip install --no-cache-dir -r requirements.txt 

# RUN pip install whitenoise
RUN pip install uvicorn
RUN pip install gunicorn



# RUN python manage.py collectstatic --noinput 

# CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "--threads", "2", "--worker-class", "uvicorn.workers.UvicornWorker", "projects.asgi:application"]
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--worker-class", "uvicorn.workers.UvicornWorker", "projects.asgi:application"]



EXPOSE 8000