resecntly
This commit is contained in:
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@ -0,0 +1,33 @@
|
||||
# pull official base image
|
||||
FROM python:3.10-slim-buster
|
||||
|
||||
# set work directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# set environment variable
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
# copy project files
|
||||
COPY . /usr/src/app/
|
||||
|
||||
# install system dependencies
|
||||
RUN apt-get update
|
||||
#RUN apt-get install -y gcc pkg-config default-libmysqlclient-dev python-dev vim systemd
|
||||
RUN apt-get install -y gcc pkg-config default-libmysqlclient-dev python-dev
|
||||
RUN apt-get clean
|
||||
|
||||
# install python dependencies
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# collect static files
|
||||
# RUN python manage.py collectstatic --noinput
|
||||
|
||||
# expose the port
|
||||
EXPOSE 8000
|
||||
|
||||
# command to run
|
||||
CMD ["gunicorn", "--workers=3", "--bind=0.0.0.0:8000", "auth_prj.wsgi:application"]
|
||||
|
||||
|
Reference in New Issue
Block a user