forked from lukas2511/voctoconf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (41 loc) · 1.05 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM python:3.6-alpine
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# workdir
RUN mkdir /app
WORKDIR /app
# Install build deps
RUN apk add \
gcc \
g++ \
make \
libc-dev \
libffi-dev \
# musl-dev \
# linux-headers \
# pcre-dev \
postgresql-dev \
mariadb-dev \
jpeg-dev \
freetype-dev \
gettext
# Install dependencies
ADD requirements.txt /app/requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# add everything
ADD . /app
# set up crontab
COPY crontab /etc/crontab
RUN chmod 0644 /etc/crontab && crontab /etc/crontab
RUN chmod 0755 /app/cron.sh
# listen on this port
EXPOSE 8000
# Add any custom, static environment variables needed by Django or your settings file here:
#ENV DJANGO_SETTINGS_MODULE=my_project.settings.deploy
# entrypoint
RUN chmod 755 /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]
# Start uWSGI
CMD ["gunicorn", "voctoconf.wsgi:application", "--bind", "0.0.0.0:8000"]