# Base image FROM python:3.10.6 # Set environment variables ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 # Set working directory WORKDIR /app # Copy and install requirements COPY ./requirements.txt /app/requirements.txt RUN pip install -r requirements.txt # Install uwsgi RUN pip install uwsgi # Copy the project files into the working directory COPY . /app/ # Collect static files RUN python manage.py collectstatic --noinput #RUN python manage.py migrate RUN ls -al /app # Run uWSGI with Unix socket CMD ["uwsgi", "--chdir", "/app", "--ini", "uwsgi.ini"] # Run uWSGI #CMD ["uwsgi", "--socket", ":8000", "--module", "dynamicweb2.wsgi:application", "--chdir", "/app"]