-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (24 loc) · 917 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
FROM python:3
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
LABEL "com.mywebsite.version"="1.0"
RUN mkdir /app
WORKDIR /app
RUN python -m pip install --upgrade pip
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
RUN python -m pip install pipenv
# RUN python -m pip install pipenv==2018.10.13
RUN pipenv install --deploy --system
RUN apt update
RUN apt-get install memcached
COPY . /app/
EXPOSE 8000
# Start project using a simple script file
# ENTRYPOINT [ "../start/start.sh" ]
# ...or with development server
# ENTRYPOINT [ "python", "/app/manage.py", "runserver", "0.0.0.0:8000" ]
# CMD pipenv run python manage.py runserver 0.0.0.0:8000
# ...or Gunicorn for production purposes
# CMD gunicorn mywebsite.wsgi -w 4 -b 0.0.0.0:8000 --chdir=/app/mywebsite --log-file -
# CMD gunicorn mywebsite.wsgi -w 4 -b 0.0.0.0:8000 --chdir=/app/mywebsite --log-level=debug --log-file=/var/gunicorn_log.log