dynamicweb2/Dockerfile

33 lines
686 B
Text
Raw Permalink Normal View History

2023-12-13 05:11:01 +00:00
# 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
2023-12-13 05:11:01 +00:00
# Copy the project files into the working directory
COPY . /app/
# Collect static files
RUN python manage.py collectstatic --noinput
2023-12-13 14:28:06 +00:00
#RUN python manage.py migrate
RUN ls -al /app
2023-12-13 05:11:01 +00:00
# Run uWSGI with Unix socket
2023-12-13 14:28:06 +00:00
CMD ["uwsgi", "--chdir", "/app", "--ini", "uwsgi.ini"]
# Run uWSGI
#CMD ["uwsgi", "--socket", ":8000", "--module", "dynamicweb2.wsgi:application", "--chdir", "/app"]