-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
36 lines (25 loc) · 845 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Use the official Python image from the Docker Hub
FROM python:3.8.2
# These two environment variables prevent __pycache__/ files.
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
# Make a new directory to put our code in.
RUN mkdir /code
# Change the working directory.
# Every command after this will be run from the /code directory.
WORKDIR /code
# Copy the requirements.txt file.
COPY ./requirements.txt /code/
# Upgrade pip
RUN pip install --upgrade pip
# Install the requirements.
RUN pip install -r requirements.txt
# Copy the rest of the code.
COPY . /code/
# expose the port 8000
EXPOSE 8000
# define the default command to run when starting the container
CMD ["gunicorn", "--bind", ":8000", "spcportal.wsgi:application"]
#CMD ["pytest"]
# CMD [ "./manage.py", "runserver", "0.0.0.0:8000"]
# CMD ["bash", "./run.sh"]